Support debian_networking boot option to use Debian's network behavior
authorMichael Prokop <mika@grml.org>
Thu, 13 Dec 2018 16:26:36 +0000 (17:26 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 14 Dec 2018 14:37:25 +0000 (15:37 +0100)
Debian's ip=... support diverges from kernel one and we (Grml) prefer
to use the behavior that's used by the kernel. By default we use our
Grml_Networking implementation from components/9990-grml-networking.sh,
but if the debian_networking boot option is used then we use Debian's
live-boot behavior with Netbase from components/9990-netbase.sh.
(Some minor details also diverge in the network handling, with
vlan support present in Grml, different nameserver handling,...)

components/9990-main.sh

index 0202130..b9bd71b 100755 (executable)
@@ -182,11 +182,14 @@ Live ()
        mount --rbind /run/live ${rootmnt}/lib/live/mount
 
        Fstab
-       Netbase
 
        Swap
 
-       Grml_Networking
+       if grep -q debian_networking /proc/cmdline ; then
+               Netbase
+       else
+               Grml_Networking
+       fi
 
        exec 1>&6 6>&-
        exec 2>&7 7>&-