From d70b77f919f85511936645abb95d710b80c10c74 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 18 Apr 2010 20:37:59 +0200 Subject: [PATCH] Adding upstream version 1.87.2. --- bin/casper-getty | 15 ---- bin/casper-login | 6 -- bin/live-getty | 20 ++++++ bin/live-login | 12 ++++ {casper-md5check => bin/live-md5check}/Makefile | 4 +- .../live-md5check/live-md5check.c | 0 {casper-md5check => bin/live-md5check}/md5.c | 0 {casper-md5check => bin/live-md5check}/md5.h | 0 bin/{casper-preseed => live-preseed} | 4 +- bin/{casper-reconfigure => live-reconfigure} | 0 bin/{casper-snapshot => live-snapshot} | 20 +++--- casper.conf | 8 --- caspermon/GNOME_PythonAppletCasper.server | 30 -------- caspermon/caspermon-applet | 75 ------------------- caspermon/caspermond | 9 --- conf/live.conf | 9 +++ doc/ChangeLog | 28 ++++++++ hooks/{casper => live} | 16 ++--- manpages/live-initramfs.7 | 84 ++++++++++++++++++++++ manpages/live-snapshot.1 | 70 ++++++++++++++++++ scripts/{casper => live} | 52 +++++++------- .../01integrity_check | 2 +- scripts/{casper-bottom => live-bottom}/02_timezone | 4 +- .../{casper-bottom => live-bottom}/05mountpoints | 2 +- scripts/{casper-bottom => live-bottom}/10adduser | 6 +- scripts/{casper-bottom => live-bottom}/12fstab | 2 +- scripts/{casper-bottom => live-bottom}/13swap | 2 +- scripts/{casper-bottom => live-bottom}/14locales | 2 +- scripts/{casper-bottom => live-bottom}/15autologin | 2 +- scripts/{casper-bottom => live-bottom}/18hostname | 2 +- scripts/{casper-bottom => live-bottom}/19keyboard | 14 ++-- scripts/{casper-bottom => live-bottom}/20xconfig | 6 +- .../22gnome_panel_data | 4 +- .../{casper-bottom => live-bottom}/22screensaver | 2 +- .../{casper-bottom => live-bottom}/23etc_modules | 2 +- .../{casper-bottom => live-bottom}/23networking | 2 +- scripts/{casper-bottom => live-bottom}/24preseed | 6 +- .../25configure_init | 2 +- .../{casper-bottom => live-bottom}/30accessibility | 2 +- .../31disable_update_notifier | 2 +- .../32disable_hibernation | 4 +- .../33enable_apport_crashes | 2 +- .../34disable_kwallet | 4 +- .../35fix_language_selector | 2 +- .../40install_driver_updates | 2 +- scripts/{casper-bottom => live-bottom}/41apt_cdrom | 2 +- scripts/{casper-functions => live-functions} | 0 scripts/{casper-helpers => live-helpers} | 0 .../10driver_updates | 4 +- 49 files changed, 314 insertions(+), 234 deletions(-) delete mode 100755 bin/casper-getty delete mode 100755 bin/casper-login create mode 100755 bin/live-getty create mode 100755 bin/live-login rename {casper-md5check => bin/live-md5check}/Makefile (50%) rename casper-md5check/casper-md5check.c => bin/live-md5check/live-md5check.c (100%) rename {casper-md5check => bin/live-md5check}/md5.c (100%) rename {casper-md5check => bin/live-md5check}/md5.h (100%) rename bin/{casper-preseed => live-preseed} (63%) rename bin/{casper-reconfigure => live-reconfigure} (100%) rename bin/{casper-snapshot => live-snapshot} (93%) delete mode 100644 casper.conf delete mode 100644 caspermon/GNOME_PythonAppletCasper.server delete mode 100755 caspermon/caspermon-applet delete mode 100644 caspermon/caspermond create mode 100644 conf/live.conf rename hooks/{casper => live} (73%) create mode 100644 manpages/live-initramfs.7 create mode 100644 manpages/live-snapshot.1 rename scripts/{casper => live} (92%) rename scripts/{casper-bottom => live-bottom}/01integrity_check (61%) rename scripts/{casper-bottom => live-bottom}/02_timezone (74%) rename scripts/{casper-bottom => live-bottom}/05mountpoints (92%) rename scripts/{casper-bottom => live-bottom}/10adduser (89%) rename scripts/{casper-bottom => live-bottom}/12fstab (92%) rename scripts/{casper-bottom => live-bottom}/13swap (96%) rename scripts/{casper-bottom => live-bottom}/14locales (97%) rename scripts/{casper-bottom => live-bottom}/15autologin (98%) rename scripts/{casper-bottom => live-bottom}/18hostname (95%) rename scripts/{casper-bottom => live-bottom}/19keyboard (79%) rename scripts/{casper-bottom => live-bottom}/20xconfig (89%) rename scripts/{casper-bottom => live-bottom}/22gnome_panel_data (88%) rename scripts/{casper-bottom => live-bottom}/22screensaver (95%) rename scripts/{casper-bottom => live-bottom}/23etc_modules (92%) rename scripts/{casper-bottom => live-bottom}/23networking (98%) rename scripts/{casper-bottom => live-bottom}/24preseed (81%) rename scripts/{casper-bottom => live-bottom}/25configure_init (98%) rename scripts/{casper-bottom => live-bottom}/30accessibility (99%) rename scripts/{casper-bottom => live-bottom}/31disable_update_notifier (96%) rename scripts/{casper-bottom => live-bottom}/32disable_hibernation (92%) rename scripts/{casper-bottom => live-bottom}/33enable_apport_crashes (95%) rename scripts/{casper-bottom => live-bottom}/34disable_kwallet (87%) rename scripts/{casper-bottom => live-bottom}/35fix_language_selector (95%) rename scripts/{casper-bottom => live-bottom}/40install_driver_updates (95%) rename scripts/{casper-bottom => live-bottom}/41apt_cdrom (91%) rename scripts/{casper-functions => live-functions} (100%) rename scripts/{casper-helpers => live-helpers} (100%) rename scripts/{casper-premount => live-premount}/10driver_updates (98%) diff --git a/bin/casper-getty b/bin/casper-getty deleted file mode 100755 index f885fa9..0000000 --- a/bin/casper-getty +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/sh - -autologin=1 -for opt in "$@" ; do - if [ "$opt" = "-l" -o "$opt" = "-n" ] ; then - autologin=0 - fi -done - -if [ "$autologin" = "1" ] ; then - exec /sbin/getty -n -l /sbin/casper-login $* -else - exec /sbin/getty $* -fi - diff --git a/bin/casper-login b/bin/casper-login deleted file mode 100755 index e6a4173..0000000 --- a/bin/casper-login +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/sh - -USERNAME=root -[ -f /etc/casper.conf ] && . /etc/casper.conf -exec /bin/login -f $USERNAME - diff --git a/bin/live-getty b/bin/live-getty new file mode 100755 index 0000000..6781ea5 --- /dev/null +++ b/bin/live-getty @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +AUTOLOGIN="1" + +for ARGUMENT in "${@}" +do + if [ "${ARGUMENT}" = "-l" ] || [ "${ARGUMENT}" = "-n" ] + then + AUTOLOGIN="0" + fi +done + +if [ "${AUTOLOGIN}" = "1" ] +then + exec /sbin/getty -n -l /sbin/live-login ${*} +else + exec /sbin/getty ${*} +fi diff --git a/bin/live-login b/bin/live-login new file mode 100755 index 0000000..c2cc5a1 --- /dev/null +++ b/bin/live-login @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +USERNAME="root" + +if [ -f /etc/live.conf ] +then + . /etc/live.conf +fi + +exec /bin/login -f "${USERNAME}" diff --git a/casper-md5check/Makefile b/bin/live-md5check/Makefile similarity index 50% rename from casper-md5check/Makefile rename to bin/live-md5check/Makefile index 4e5408f..51e42b9 100644 --- a/casper-md5check/Makefile +++ b/bin/live-md5check/Makefile @@ -3,7 +3,7 @@ CC=gcc LDFLAGS=-lm CFLAGS=$(getconf LFS_CFLAGS) -Wall -O2 -casper-md5check: casper-md5check.c md5.c +live-md5check: live-md5check.c md5.c clean: - rm -f *.o casper-md5check + rm -f *.o live-md5check diff --git a/casper-md5check/casper-md5check.c b/bin/live-md5check/live-md5check.c similarity index 100% rename from casper-md5check/casper-md5check.c rename to bin/live-md5check/live-md5check.c diff --git a/casper-md5check/md5.c b/bin/live-md5check/md5.c similarity index 100% rename from casper-md5check/md5.c rename to bin/live-md5check/md5.c diff --git a/casper-md5check/md5.h b/bin/live-md5check/md5.h similarity index 100% rename from casper-md5check/md5.h rename to bin/live-md5check/md5.h diff --git a/bin/casper-preseed b/bin/live-preseed similarity index 63% rename from bin/casper-preseed rename to bin/live-preseed index c0c76eb..c10315e 100755 --- a/bin/casper-preseed +++ b/bin/live-preseed @@ -8,8 +8,8 @@ value="$3" seen="$4" [ "$seen" ] || seen=true -if ! (echo "SET $question $value"; echo "FSET $question seen $seen") | chroot "$1" debconf-communicate -fnoninteractive casper >/dev/null; then - chroot "$1" debconf-communicate -fnoninteractive casper >/dev/null </dev/null; then + chroot "$1" debconf-communicate -fnoninteractive live-initramfs >/dev/null < - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/caspermon/caspermon-applet b/caspermon/caspermon-applet deleted file mode 100755 index 773e0a4..0000000 --- a/caspermon/caspermon-applet +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/python - -import pygtk -pygtk.require('2.0') - -import gtk -import gnome.applet -import subprocess -import os - -# A simple applet to display the utilization of the snapshot device -# during a casper session -# -# Matt Zimmerman - -# TODO: -# - tooltip with details -# - flash at threshold - -class CasperApplet: - def __init__(self, applet, iid): - self.timeout_interval = 1000 - self.device = 'casper-snapshot' - self.capacity = [0,0] - self.datafile = '/var/lib/casper/snapshot-status' - - # initializate the gnome internals - gnome.init("casper", "0.1") - - self.applet = applet - - self.tooltips = gtk.Tooltips() - self.hbox = gtk.HBox() - applet.add(self.hbox) - - # add the second button event for the popup menu and the enter mouse event to change the tooltip value - self.ev_box = gtk.EventBox() - #self.ev_box.connect("button-press-event",self.button_press) - self.ev_box.connect("enter-notify-event", self.update_info) - self.hbox.add(self.ev_box) - - self.prog = gtk.ProgressBar() - self.ev_box.add(self.prog) - - self.update_info() - - gtk.timeout_add(self.timeout_interval,self.update_info, self) - - applet.connect("destroy",self.cleanup) - applet.show_all() - - def update_info(self, event=None): - self.capacity = self.read_info() - self.prog.set_fraction(float(self.capacity[0]) / self.capacity[1]) - self.prog.update() - - def read_info(self): - fields = open(self.datafile).readline().split() - if fields[2] != 'snapshot': - return None - - return map(int,fields[3].split('/', 1)) - - def cleanup(self): - # what goes here? - pass - -def casper_factory(applet, iid): - CasperApplet(applet, iid) - - return gtk.TRUE - -gnome.applet.bonobo_factory("OAFIID:GNOME_PythonAppletCasper_Factory", - gnome.applet.Applet.__gtype__, - "casper", "0", casper_factory) diff --git a/caspermon/caspermond b/caspermon/caspermond deleted file mode 100644 index e126447..0000000 --- a/caspermon/caspermond +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -STATEFILE=/var/run/caspermond/status.casper-snapshot - -while true; do - dmsetup status /dev/mapper/casper-snapshot > $STATEFILE.new - mv $STATEFILE.new $STATEFILE - sleep 60 -done diff --git a/conf/live.conf b/conf/live.conf new file mode 100644 index 0000000..0b44894 --- /dev/null +++ b/conf/live.conf @@ -0,0 +1,9 @@ +# /etc/live.conf: configuration file for live-initramfs + +BUILD_SYSTEM="Debian" + +USERNAME="user" +USERFULLNAME="Live session user" +HOST="debian" + +export BUILD_SYSTEM USERNAME USERFULLNAME HOST diff --git a/doc/ChangeLog b/doc/ChangeLog index af2cf53..087aa82 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,31 @@ +2007-05-06 Daniel Baumann + + * bin/casper-getty, casper-login, casper-preseed, casper-reconfigure, + casper-snapshot: + - Renamed to live-*. + * casper-md5check: + - Moved to bin. + - Renamed to live-md5check. + * casper.conf: + - Moved to conf/live.conf. + * caspermon: + - Removed. + * scripts/casper, casper-bottom, casper-functions, casper-helpers, + casper-premount: + - Renamed to live-*. + * bin/live-getty, live-login, conf/live.conf: + - Reformated. + * bin/live-snapshot, debian/dirs, debian/install, debian/rules, + hooks/live, scripts/live: + - Replaces casper path names with live. + * debian/manpage: + - Moved to manpages. + - Renamed casper.7 to live-initramfs.7. + * debian/init: + - Changed activation parameter from boot=casper to boot=live. + * scripts/casper-bottom/02_timezone: + - Fixed wrong script description. + 2007-04-30 Daniel Baumann * Forked casper 1.87. diff --git a/hooks/casper b/hooks/live similarity index 73% rename from hooks/casper rename to hooks/live index 78a3cfb..94383ca 100755 --- a/hooks/casper +++ b/hooks/live @@ -24,9 +24,9 @@ manual_add_modules unionfs copy_exec /sbin/losetup /sbin # Casper hooks -mkdir -p ${DESTDIR}/lib/casper -copy_exec /usr/share/casper/casper-reconfigure /bin -copy_exec /usr/share/casper/casper-preseed /bin +mkdir -p ${DESTDIR}/lib/live-initramfs +copy_exec /usr/share/live-initramfs/live-reconfigure /bin +copy_exec /usr/share/live-initramfs/live-preseed /bin mkdir -p ${DESTDIR}/lib/udev copy_exec /lib/udev/cdrom_id /lib/udev @@ -62,14 +62,14 @@ manual_add_modules sbp2 manual_add_modules ohci1394 # integrity check -copy_exec /usr/lib/casper/casper-md5check /bin +copy_exec /usr/lib/live-initramfs/live-md5check /bin -cp /usr/share/initramfs-tools/scripts/casper-functions $DESTDIR/scripts -cp /usr/share/initramfs-tools/scripts/casper-helpers $DESTDIR/scripts +cp /usr/share/initramfs-tools/scripts/live-functions $DESTDIR/scripts +cp /usr/share/initramfs-tools/scripts/live-helpers $DESTDIR/scripts auto_add_modules net -if [ -e /etc/casper.conf ]; then +if [ -e /etc/live.conf ]; then mkdir -p ${DESTDIR}/etc - cp /etc/casper.conf ${DESTDIR}/etc + cp /etc/live.conf ${DESTDIR}/etc fi diff --git a/manpages/live-initramfs.7 b/manpages/live-initramfs.7 new file mode 100644 index 0000000..d35e018 --- /dev/null +++ b/manpages/live-initramfs.7 @@ -0,0 +1,84 @@ +.TH CASPER 7 "Thu, 28 Sep 2006" "1.69" "Initramfs-tools hook" + +.SH NAME +casper \- a hook for initramfs-tools to boot live systems. + +.SH SYNOPSIS +.B BOOT=casper +As kernel parameter boot prompt. + +.SH DESCRIPTION +Casper is a hook for initramfs-tools used to generate an initramfs capable to boot live systems as those created by make-live. This includes the Debian-Live isos, netboot tarballs, and usb stick images and Ubuntu live cds. At boot time it will look for a (read-only) media containing a "/casper" directory where a root filesystems (often a compressed squashfs) is stored. If found, it will create a writable environment, using unionfs, for debian like systems to boot from. + +.SH RECOGNIZED BOOT OPTIONS +.TP +.B live-getty +This enables a special "serial" login shell (experimental). +.TP +.B xdebconf +uses xdebconfigurator, if present on the rootfs, to configure X instead of the standard procedure (experimental). +.TP +.BI "hostname=" HOSTNAME " , userfullname=" USERFULLNAME " , username=" USERNAME +Those parameters lets you override values read from the config file. +.TP +.BI "{keyb|kbd-chooser/method}=" KEYBOARD " , {klayout|console-setup/layoutcode}=" LAYOUT " , {kvariant|console-setup/variantcode}=" VARIANT " , {kmodel|console-setup/modelcode}=" CODE " , koptions=" OPTIONS +Configure the running keyboard as specified, if this one misses casper behaves as if "keyb=us" was specified. It will be interfered from "locale=" if locale is only 2 lowecase letters as a special case. You could also specify console layout, variant, code, and options (no defaults). +.TP +.BI ip= IFACE,ADDRESS,NETMASK,GATEWAY [ :IFACE,ADDRESS,NETMASK,GATEWAY "]*" +Let you specify the name(s) and the options of the interface(s) that should be configured at boot time. Do not specify this if you want to use dhcp (default). +.TP +.BR ip[= frommedia ] +If this variable is set, dhcp and static configuration are just skipped and the system will use the (must be) media-preconfigured /etc/network/interfaces instead. +.TP +.BI "{live-media|bootfrom}=" DEVICE +If you specify one of this two equivalent forms, casper will first try to find this device for the "/casper" directory where the read-only root filesystem should reside. If it did not find something usable, the normal scan for block devices is performed. +.TP +.BI "live-media-offset=" BYTES +This way you could tell casper that your image starts at offset BYTES in the above specified or autodiscovered device, this could be useful to hide the debian-live iso or image inside another iso or image, to create "clean" images. +.TP +.BI "locale=" LOCALE " | debian-installer/locale=" LOCALE +Configure the running locale as specified, if not present the live-media rootfs configured locale will be used and if also this one misses casper behave as "locale=en_US.UTF-8" was specified. If only 2 lowercase letter are specified (like "it"), the "maybe wanted" locale is generated (like it:IT.UTF-8), in this case if also "keyb=" is unspecified is set with those 2 lowercase letters (keyb=it). +.TP +.BR "netboot[=" nfs "|" cifs ] +This tells casper to perform a network mount. The parameter "nfsroot=" (with optional "nfsopts="), should specify where is the location of the root filesystem. With no args, will try cifs first, and if it fails nfs. +.TP +.B persistent +Casper will look for persistent and snapshot partitions or files labeled "casper-rw", "home-rw", and files called "casper-sn*", "home-sn*" and will try to, in order: mount as /cow the first, mount the second in /home, and just copy the contents of the latter in appropriate locations (snapshots). Snapshots will be tried to be updated on reboot/shutdown. Look at live-snapshot(1) for more informations. +.TP +.B nopersistent +disables the above mentioned "persistent" feature, useful if the bootloader (like syslinux) has been installed with persistent enabled. +.TP +.B "showmounts" +This parameter will make casper to show on "/" the ro filesystems (mostly compressed) on /casper. This is not enabled by default because could lead to problems by applications like "mono" which store binary paths on installation. +.TP +.BI "todisk=" DEVICE +Adding this parameter, casper will try to copy the entire read-only media to the specified device before mounting the root filesystem. It probably needs a lot of free space. Subsequent boots should then skip this step and just specify the "live-media=DEVICE" boot parameter with the same DEVICE used this time. +.TP +.B toram +Adding this parameter, casper will try to copy the whole read-only media to the computer's RAM before mounting the root filesystem. This could need a lot of ram, according to the space used by the read-only media. +.TP +.BI "{preseed/file|file}=" FILE +A path to a file present on the rootfs could be used to preseed debconf database. +.TP +.BI "package/question=" VALUE +All debian installed packages could be preseeded from command-line that way, beware of blanks spaces, they will interfere with parsing, use a preseed file in this case. + +.SH FILES +.B /etc/live.conf +some variables can be configured via this config file. + +.SH BUGS +.B casper +works fully on amd64, i386 and ppc, it should also run on other archs. + +.SH HOMEPAGE +Debian Live project + +.SH SEE ALSO +.BR live-snapshot(1), initramfs-tools(8), make-live(8), make-live.conf(5) + +.SH AUTHOR +casper was written by Tollen Fog Heen , Matt Zimmerman , and Marco Amadori . +.TP +This manual page was written by Marco Amadori , +for the Debian project (but may be used by others). diff --git a/manpages/live-snapshot.1 b/manpages/live-snapshot.1 new file mode 100644 index 0000000..8f27412 --- /dev/null +++ b/manpages/live-snapshot.1 @@ -0,0 +1,70 @@ +.TH "CASPER-SNAPSHOT" 1 "Thu, 28 Sep 2006" "0.0.1" "User commands" + +.SH NAME +casper-snapshot \- a simple script to ease persistence usage. + +.SH SYNOPSIS +.B casper-snapshot +.RB [\| \-c \||\| \-\-cow +.IR DIRECTORY \|] +.RB [\| \-d \||\| \-\-device +.IR DEVICE \|] +.RB [\| \-e \||\| \-\-exclude\-list +.IR FILE \|] +.RB [\| \-o \||\| \-\-output +.IR FILE \|] +.RB [\| \-t \||\| \-\-type +.IR TYPE \|] +.PP +.B casper-snapshot +.RB \-r \||\| \-\-resync\-string +.IR STRING +.br +.B casper-snapshot +.RB \-h \||\| \-\-help +.br +.B casper-snapshot +.RB \-u \||\| \-\-usage +.br +.B casper-snapshot +.RB \-v \||\| \-\-version + +.SH DESCRIPTION +Casper-snapshot is a script which can be used to build the right types of persistent image files supported by casper. It is also used on exit by the casper init script to resync the boot-found snapshots devices. + +.SH OPTIONS +.TP +.BI "\-c, \-\-cow" DIRECTORY +specifies the input directory to be cloned in the image file. +Its default value "/cow" should be right for most uses. However it could be handy to specify "/home" and type ext2 for the type to prepare an image file suited to be directly mounted by casper as home. +.TP +.BI "\-d, \-\-device" DEVICE +sets the device where the media which the snapshot/persistence file/partition will be put. If it is not specified, a tmpfs will be used and linked to the user's desktop to move it where it is needed. If the device has no filesystem, an ext2 fs will be automatically created and labelled according to the values specified after the "--output" value or with a sane default. +.TP +.BI "\-e, \-\-exclude\-list" FILE +a file containing a list of filenames/paths that should not be saved. This exclude list will be remebered on the target snapshot media for reuse. +.TP +.BI "\-o, \-\-output" FILE +the filename/label used for the output file/partition. If left blank, casper-snapshot will search for a proper file on the device or use the whole partition. +.TP +.BI "\-r, \-\-resync\-string" STRING +internally used on resyncs. +.TP +.BI "\-t, \-\-type" TYPE +Type could be one of "cpio", "squashfs" or "ext2". + +.SH BUGS +.B casper-snapshot +Time (and BTS) will tell. + +.SH HOMEPAGE +Debian Live project + +.SH SEE ALSO +.BR casper(7) + +.SH AUTHOR +casper-snapshot was written Marco Amadori . +.TP +This manual page was written by Marco Amadori , +for the Debian project (but may be used by others). diff --git a/scripts/casper b/scripts/live similarity index 92% rename from scripts/casper rename to scripts/live index a4c78b3..9ab1ac5 100755 --- a/scripts/casper +++ b/scripts/live @@ -9,28 +9,28 @@ echo "/root/usr/lib" >> /etc/ld.so.conf mountpoint=/cdrom -USERNAME=casper +USERNAME=user USERFULLNAME="Live session user" HOST=live BUILD_SYSTEM=Custom mkdir -p $mountpoint -[ -f /etc/casper.conf ] && . /etc/casper.conf +[ -f /etc/live.conf ] && . /etc/live.conf export USERNAME USERFULLNAME HOST BUILD_SYSTEM -. /scripts/casper-helpers +. /scripts/live-helpers -if [ ! -f /casper.vars ]; then - touch /casper.vars +if [ ! -f /live.vars ]; then + touch /live.vars fi is_casper_path() { path=$1 - if [ -d "$path/casper" ]; then - if [ "$(echo $path/casper/*.squashfs)" != "$path/casper/*.squashfs" ] || - [ "$(echo $path/casper/*.ext2)" != "$path/casper/*.ext2" ] || - [ "$(echo $path/casper/*.dir)" != "$path/casper/*.dir" ]; then + if [ -d "$path/live" ]; then + if [ "$(echo $path/live/*.squashfs)" != "$path/live/*.squashfs" ] || + [ "$(echo $path/live/*.ext2)" != "$path/live/*.ext2" ] || + [ "$(echo $path/live/*.dir)" != "$path/live/*.dir" ]; then return 0 fi fi @@ -46,7 +46,7 @@ get_backing_device() { echo "directory" ;; *) - panic "Unrecognized casper filesystem: $1" + panic "Unrecognized live filesystem: $1" ;; esac } @@ -64,10 +64,10 @@ match_files_in_dir() { mount_images_in_directory() { directory="$1" rootmnt="$2" - if match_files_in_dir "$directory/casper/*.squashfs" || - match_files_in_dir "$directory/casper/*.ext2" || - match_files_in_dir "$directory/casper/*.dir"; then - setup_unionfs "$directory/casper" "$rootmnt" + if match_files_in_dir "$directory/live/*.squashfs" || + match_files_in_dir "$directory/live/*.ext2" || + match_files_in_dir "$directory/live/*.dir"; then + setup_unionfs "$directory/live" "$rootmnt" else : fi @@ -294,7 +294,7 @@ try_snap () return 1 fi fi - echo "export ${snap_type}SNAP="${snap_mount}":${snapdev}:${snapfile}" >> /etc/casper.conf # for resync on reboot/halt + echo "export ${snap_type}SNAP="${snap_mount}":${snapdev}:${snapfile}" >> /etc/live.conf # for resync on reboot/halt return 0 } @@ -378,15 +378,15 @@ setup_unionfs() { if [ -n "${SHOWMOUNTS}" ]; then for d in ${rofslist}; do - mkdir -p "${rootmnt}/casper/${d##*/}" + mkdir -p "${rootmnt}/live/${d##*/}" case d in - *.dir) # do nothing # mount -o bind "${d}" "${rootmnt}/casper/${d##*/}" + *.dir) # do nothing # mount -o bind "${d}" "${rootmnt}/live/${d##*/}" ;; - *) mount -o move "${d}" "${rootmnt}/casper/${d##*/}" + *) mount -o move "${d}" "${rootmnt}/live/${d##*/}" ;; esac done - # shows cow fs on /cow for use by casper-snapshot + # shows cow fs on /cow for use by live-snapshot mkdir -p "${rootmnt}/cow" mount -o bind /cow "${rootmnt}/cow" fi @@ -486,13 +486,13 @@ set_usplash_timeout() { mountroot() { exec 6>&1 exec 7>&2 - exec > casper.log + exec > live.log exec 2>&1 set_usplash_timeout - [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-premount" + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-premount" pulsate - run_scripts /scripts/casper-premount + run_scripts /scripts/live-premount [ "$quiet" != "y" ] && log_end_msg # Needed here too because some things (*cough* udev *cough*) @@ -536,14 +536,14 @@ mountroot() { log_end_msg - maybe_break casper-bottom - [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-bottom" + maybe_break live-bottom + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-bottom" pulsate - run_scripts /scripts/casper-bottom + run_scripts /scripts/live-bottom [ "$quiet" != "y" ] && log_end_msg exec 1>&6 6>&- exec 2>&7 7>&- - cp casper.log "${rootmnt}/var/log/" + cp live.log "${rootmnt}/var/log/" } diff --git a/scripts/casper-bottom/01integrity_check b/scripts/live-bottom/01integrity_check similarity index 61% rename from scripts/casper-bottom/01integrity_check rename to scripts/live-bottom/01integrity_check index 637a1ff..d5bc5fe 100755 --- a/scripts/casper-bottom/01integrity_check +++ b/scripts/live-bottom/01integrity_check @@ -15,4 +15,4 @@ prereqs) ;; esac -grep integrity-check /proc/cmdline && casper-md5check /cdrom /cdrom/md5sum.txt < /dev/tty8 +grep integrity-check /proc/cmdline && live-md5check /cdrom /cdrom/md5sum.txt < /dev/tty8 diff --git a/scripts/casper-bottom/02_timezone b/scripts/live-bottom/02_timezone similarity index 74% rename from scripts/casper-bottom/02_timezone rename to scripts/live-bottom/02_timezone index 1cb6402..873c1da 100755 --- a/scripts/casper-bottom/02_timezone +++ b/scripts/live-bottom/02_timezone @@ -1,9 +1,9 @@ #! /bin/sh PREREQ="" -DESCRIPTION="Adding APT-CDROM source..." +DESCRIPTION="Setting timezone..." -. /scripts/casper-functions +. /scripts/live-functions prereqs() { diff --git a/scripts/casper-bottom/05mountpoints b/scripts/live-bottom/05mountpoints similarity index 92% rename from scripts/casper-bottom/05mountpoints rename to scripts/live-bottom/05mountpoints index 7c61de3..411660d 100755 --- a/scripts/casper-bottom/05mountpoints +++ b/scripts/live-bottom/05mountpoints @@ -3,7 +3,7 @@ PREREQ="" DESCRIPTION="Moving mount points..." -. /scripts/casper-functions +. /scripts/live-functions prereqs() { diff --git a/scripts/casper-bottom/10adduser b/scripts/live-bottom/10adduser similarity index 89% rename from scripts/casper-bottom/10adduser rename to scripts/live-bottom/10adduser index 4fe9378..9179f1b 100755 --- a/scripts/casper-bottom/10adduser +++ b/scripts/live-bottom/10adduser @@ -3,7 +3,7 @@ PREREQ="" DESCRIPTION="Adding live session user..." -. /scripts/casper-functions +. /scripts/live-functions prereqs() { @@ -21,7 +21,7 @@ esac log_begin_msg "$DESCRIPTION" # U6aMy0wojraho is just a blank password -chroot /root debconf-communicate -fnoninteractive casper > /dev/null < /dev/null < /dev/null # Clear out debconf database again to avoid confusing ubiquity later. -chroot /root debconf-communicate -fnoninteractive casper > /dev/null < /dev/null < /dev/null < /dev/null </dev/null) || panel_version="" if [ -n "$gpm_version" ]; then -# casper-reconfigure /root gnome-power-manager +# live-reconfigure /root gnome-power-manager chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/can_hibernate false chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/can_suspend false fi diff --git a/scripts/casper-bottom/33enable_apport_crashes b/scripts/live-bottom/33enable_apport_crashes similarity index 95% rename from scripts/casper-bottom/33enable_apport_crashes rename to scripts/live-bottom/33enable_apport_crashes index d1c8829..1fb1145 100755 --- a/scripts/casper-bottom/33enable_apport_crashes +++ b/scripts/live-bottom/33enable_apport_crashes @@ -3,7 +3,7 @@ PREREQ="" DESCRIPTION="Enabling notifications about program crashes..." -. /scripts/casper-functions +. /scripts/live-functions prereqs() { diff --git a/scripts/casper-bottom/34disable_kwallet b/scripts/live-bottom/34disable_kwallet similarity index 87% rename from scripts/casper-bottom/34disable_kwallet rename to scripts/live-bottom/34disable_kwallet index add7cca..9fd0c26 100755 --- a/scripts/casper-bottom/34disable_kwallet +++ b/scripts/live-bottom/34disable_kwallet @@ -3,7 +3,7 @@ PREREQ="" DESCRIPTION="Disabling kwallet..." -. /scripts/casper-functions +. /scripts/live-functions prereqs() { @@ -22,4 +22,4 @@ log_begin_msg "$DESCRIPTION" rm -f /root/usr/share/services/kded/kwalletd.desktop -log_end_msg \ No newline at end of file +log_end_msg diff --git a/scripts/casper-bottom/35fix_language_selector b/scripts/live-bottom/35fix_language_selector similarity index 95% rename from scripts/casper-bottom/35fix_language_selector rename to scripts/live-bottom/35fix_language_selector index 3a22602..1fb78e5 100755 --- a/scripts/casper-bottom/35fix_language_selector +++ b/scripts/live-bottom/35fix_language_selector @@ -3,7 +3,7 @@ PREREQ="" DESCRIPTION="Fixing language selector..." -. /scripts/casper-functions +. /scripts/live-functions prereqs() { diff --git a/scripts/casper-bottom/40install_driver_updates b/scripts/live-bottom/40install_driver_updates similarity index 95% rename from scripts/casper-bottom/40install_driver_updates rename to scripts/live-bottom/40install_driver_updates index 272a0ed..5822f8f 100755 --- a/scripts/casper-bottom/40install_driver_updates +++ b/scripts/live-bottom/40install_driver_updates @@ -3,7 +3,7 @@ PREREQ="" DESCRIPTION="Installing driver updates..." -. /scripts/casper-functions +. /scripts/live-functions prereqs() { diff --git a/scripts/casper-bottom/41apt_cdrom b/scripts/live-bottom/41apt_cdrom similarity index 91% rename from scripts/casper-bottom/41apt_cdrom rename to scripts/live-bottom/41apt_cdrom index b4ab643..97b2cdc 100755 --- a/scripts/casper-bottom/41apt_cdrom +++ b/scripts/live-bottom/41apt_cdrom @@ -3,7 +3,7 @@ PREREQ="" DESCRIPTION="Adding APT-CDROM source..." -. /scripts/casper-functions +. /scripts/live-functions prereqs() { diff --git a/scripts/casper-functions b/scripts/live-functions similarity index 100% rename from scripts/casper-functions rename to scripts/live-functions diff --git a/scripts/casper-helpers b/scripts/live-helpers similarity index 100% rename from scripts/casper-helpers rename to scripts/live-helpers diff --git a/scripts/casper-premount/10driver_updates b/scripts/live-premount/10driver_updates similarity index 98% rename from scripts/casper-premount/10driver_updates rename to scripts/live-premount/10driver_updates index 8009849..55aece5 100755 --- a/scripts/casper-premount/10driver_updates +++ b/scripts/live-premount/10driver_updates @@ -1,8 +1,8 @@ #!/bin/sh PREREQ="" -. /scripts/casper-functions -. /scripts/casper-helpers +. /scripts/live-functions +. /scripts/live-helpers prereqs() { -- 2.1.4