Moving remaining stuff from /live to /lib/live to avoid further namespace pollution.
authorDaniel Baumann <daniel@debian.org>
Thu, 27 Sep 2012 09:10:10 +0000 (11:10 +0200)
committerDaniel Baumann <daniel@debian.org>
Thu, 27 Sep 2012 09:10:49 +0000 (11:10 +0200)
bin/live-system
bin/live-toram
bin/live-update-initramfs

index c12f3f0..ee550b3 100755 (executable)
@@ -51,9 +51,9 @@ if grep -qs "boot=live" /proc/cmdline
 then
        [ "${_VERBOSE}" ] && echo -n " yes, this is a debian-live based system"
 
-       if [ -d /live/image/install ]
+       if [ -d /lib/live/image/install ]
        then
-               if ls /live/image/install/pool/main/l/live-installer/live-installer_*.udeb > /dev/null 2>&1
+               if ls /lib/live/image/install/pool/main/l/live-installer/live-installer_*.udeb > /dev/null 2>&1
                then
                        [ "${_VERBOSE}" ] && echo " with debian-installer (live) support."
                else
index 3b2a473..ee3af2b 100755 (executable)
@@ -23,16 +23,16 @@ done
 # Assemble filesystems
 if [ -z "${_MODULE}" ]
 then
-       _FILESYSTEMS="/live/image/live/filesystem.squashfs"
+       _FILESYSTEMS="/lib/live/image/live/filesystem.squashfs"
 else
        for _FILESYSTEM in _MODULE
        do
-               _FILESYSTEMS="${_FILESYSTEMS} /live/image/live/${_FILESYSTEM}"
+               _FILESYSTEMS="${_FILESYSTEMS} /lib/live/image/live/${_FILESYSTEM}"
        done
 fi
 
 # Exit if system is not debian-live based system
-if [ ! -d /live/image ]
+if [ ! -d /lib/live/image ]
 then
        echo "E: live-toram only works on Debian Live based systems."
 
@@ -109,12 +109,12 @@ EOF
 done
 
 # Unmounting live media
-_DEVICE="$(awk '/\/live\/image / { print $1 }' /proc/mounts)"
+_DEVICE="$(awk '/\/lib\/live\/image / { print $1 }' /proc/mounts)"
 
-if [ -d /live/image ]
+if [ -d /lib/live/image ]
 then
-       umount /live/image
-       rmdir --ignore-fail-on-non-empty /live/image || true
+       umount /lib/live/image
+       rmdir --ignore-fail-on-non-empty /lib/live/image || true
 fi
 
 # Ejecting live media if it is not an optical device
index b0adfb6..1d6fbf6 100755 (executable)
@@ -22,24 +22,24 @@ fi
 
 if grep -qs "boot=live" /proc/cmdline
 then
-       if grep -qs "\/live\/image" /proc/mounts
+       if grep -qs "\/lib\/live\/image" /proc/mounts
        then
-               # live system with live media mounted as /live/image
-               _DEVICE="$(awk '/\/live\/image/ { print $1 }' /proc/mounts)"
+               # live system with live media mounted as /lib/live/image
+               _DEVICE="$(awk '/\/lib\/live\/image/ { print $1 }' /proc/mounts)"
 
                mount -o remount,rw ${_DEVICE} > /dev/null 2>&1 || true
 
-               if touch /live/image/.test > /dev/null 2>&1
+               if touch /lib/live/image/.test > /dev/null 2>&1
                then
                        _READ_WRITE="true"
 
-                       rm -f /live/image/.test
+                       rm -f /lib/live/image/.test
                else
                        _READ_WRITE="false"
                fi
        else
-               # live system without live media mounted as /live/image
-               echo "I: update-initramfs is disabled (live system is running without media mounted on /live/image)."
+               # live system without live media mounted as /lib/live/image
+               echo "I: update-initramfs is disabled (live system is running without media mounted on /lib/live/image)."
 
                exit 0
        fi
@@ -64,20 +64,20 @@ case "${_READ_WRITE}" in
                        do
                                _VERSION="$(echo ${_INITRD} | sed -e 's|initrd.img-||')"
 
-                               cp /boot/vmlinuz-${_VERSION} /live/image/live/vmlinuz${_NUMBER}.new
-                               cp /boot/initrd.img-${_VERSION} /live/image/live/initrd${_NUMBER}.img.new
+                               cp /boot/vmlinuz-${_VERSION} /lib/live/image/live/vmlinuz${_NUMBER}.new
+                               cp /boot/initrd.img-${_VERSION} /lib/live/image/live/initrd${_NUMBER}.img.new
 
-                               mv /live/image/live/vmlinuz${_NUMBER}.new /live/image/live/vmlinuz${_NUMBER}
-                               mv /live/image/live/initrd${_NUMBER}.img.new /live/image/live/initrd${_NUMBER}.img
+                               mv /lib/live/image/live/vmlinuz${_NUMBER}.new /lib/live/image/live/vmlinuz${_NUMBER}
+                               mv /lib/live/image/live/initrd${_NUMBER}.img.new /lib/live/image/live/initrd${_NUMBER}.img
 
                                _NUMBER="$((${_NUMBER} + 1))"
                        done
                else
-                       cp /boot/vmlinuz-* /live/image/live/vmlinuz.new
-                       cp /boot/initrd.img-* /live/image/live/initrd.img.new
+                       cp /boot/vmlinuz-* /lib/live/image/live/vmlinuz.new
+                       cp /boot/initrd.img-* /lib/live/image/live/initrd.img.new
 
-                       mv /live/image/live/vmlinuz.new /live/image/live/vmlinuz
-                       mv /live/image/live/initrd.img.new /live/image/live/initrd.img
+                       mv /lib/live/image/live/vmlinuz.new /lib/live/image/live/vmlinuz
+                       mv /lib/live/image/live/initrd.img.new /lib/live/image/live/initrd.img
                fi
                ;;