Hello all,

I patched casper's 23networking script so it is now possible to boot without automatic dhcp discovery.
When you use the "nodhcp" boot option all networking configuration is saved to another file - /etc/network/interfaces.casper.
The original file - /etc/network/interfaces (which should be pre-configured) is then used by the system.

I also removed the second loop over the interfaces (eth0 eth1 eth2 ath0 wlan0), because it is redundant and I can't see any added value for this... someone please tell me if i'm wrong.

The patch is against casper 1.66+debian-1

Hadar Weiss
--- casper/bzr/casper-debian/scripts/casper-bottom/23networking	2006-09-06 17:22:44.000000000 +0300
+++ vamos/server/initrd/scripts/casper-bottom/23networking	2006-09-06 21:01:01.000000000 +0300
@@ -2,7 +2,11 @@
 
 PREREQ=""
 DESCRIPTION="Preconfiguring networking..."
-IFFILE="/root/etc/network/interfaces"
+if [ "$nodhcp" = "y" ] ; then
+	IFFILE="/root/etc/network/interfaces.casper"
+else
+	IFFILE="/root/etc/network/interfaces"
+fi
 
 . /scripts/functions
 
@@ -42,13 +46,4 @@
 	done
 fi
 
-for i in eth0 eth1 eth2 ath0 wlan0; do
-    [ ! -e /sys/class/net/$i ] || continue
-    cat >> "$IFFILE" <<EOF
-auto $i
-iface $i inet dhcp
-
-EOF
-done
-
 log_end_msg
--- vamos/server/initrd/init.old	2006-09-06 22:40:29.000000000 +0300
+++ vamos/server/initrd/init	2006-09-06 20:54:14.000000000 +0300
@@ -40,6 +40,7 @@
 # Parse command line options
 export break=
 export init=/sbin/init
+export nodhcp=n
 export quiet=n
 export readonly=y
 export rootmnt=/root
@@ -96,6 +97,9 @@
 	panic=*)
 		panic="${x#panic=}"
 		;;
+	nodhcp)
+		nodhcp=y
+		;;
 	quiet)
 		quiet=y
 		;;
_______________________________________________
Debian-live-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

Reply via email to