Support debian_networking boot option to use Debian's network behavior
[live-boot-grml.git] / components / 9990-main.sh
index b585704..b9bd71b 100755 (executable)
@@ -174,11 +174,23 @@ 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
 
+       if grep -q debian_networking /proc/cmdline ; then
+               Netbase
+       else
+               Grml_Networking
+       fi
+
        exec 1>&6 6>&-
        exec 2>&7 7>&-
        kill ${tailpid}