Adding live-initramfs 1.87.2-1.
[live-boot-grml.git] / scripts / live
similarity index 92%
rename from scripts/casper
rename to scripts/live
index a4c78b3..9ab1ac5 100755 (executable)
@@ -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/"
 }