Merge remote-tracking branch 'upstream/master'
[live-boot-grml.git] / components / 9990-main.sh
index bab0bd7..0202130 100755 (executable)
@@ -111,10 +111,10 @@ Live ()
        then
                losetup -d /dev/loop0
 
-               if is_mountpoint /live/fromiso
+               if is_mountpoint /run/live/fromiso
                then
-                       umount /live/fromiso
-                       rmdir --ignore-fail-on-non-empty /live/fromiso \
+                       umount /run/live/fromiso
+                       rmdir --ignore-fail-on-non-empty /run/live/fromiso \
                                >/dev/null 2>&1 || true
                fi
        fi
@@ -174,13 +174,24 @@ Live ()
                panic "A wrong rootfs was mounted."
        fi
 
+       # avoid breaking existing user scripts that rely on the old path
+       # this includes code that checks what is mounted on /lib/live/mount/*
+       # (eg: grep /lib/live /proc/mount)
+       # XXX: to be removed before the bullseye release
+       mkdir -p ${rootmnt}/lib/live/mount
+       mount --rbind /run/live ${rootmnt}/lib/live/mount
+
        Fstab
        Netbase
 
        Swap
 
+       Grml_Networking
+
        exec 1>&6 6>&-
        exec 2>&7 7>&-
        kill ${tailpid}
-       [ -w "${rootmnt}/var/log/" ] && mkdir -p "${rootmnt}/var/log/live" && cp boot.log "${rootmnt}/var/log/live" 2>/dev/null
+       [ -w "${rootmnt}/var/log/" ] && mkdir -p "${rootmnt}/var/log/live" && ( \
+                               cp boot.log "${rootmnt}/var/log/live" 2>/dev/null; \
+                               cp fsck.log "${rootmnt}/var/log/live" 2>/dev/null )
 }