--- /etc/init.d/networking.ori 2007-12-04 01:12:50.000000000 +0200 +++ /etc/init.d/networking 2007-12-04 01:12:18.000000000 +0200 @@ -10,10 +10,20 @@ PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +INIT_FLAG=/var/run/network/initialized + [ -x /sbin/ifup ] || exit 0 . /lib/lsb/init-functions +net_flag_up () { + touch $INIT_FLAG > /dev/null 2>/dev/null || true +} + +net_flag_down () { + rm -f $INIT_FLAG > /dev/null 2>/dev/null || true +} + case "$1" in start) log_action_begin_msg "Configuring network interfaces" @@ -32,6 +42,9 @@ fi fi type usplash_write >/dev/null 2>/dev/null && usplash_write "TIMEOUT 15" || true + + net_flag_up + ;; stop) @@ -55,12 +68,19 @@ log_action_end_msg $? fi fi + + net_flag_down + ;; force-reload|restart) log_action_begin_msg "Reconfiguring network interfaces" ifdown -a --exclude=lo || true + + net_flag_down + if ifup -a --exclude=lo; then + net_flag_up log_action_end_msg $? else log_action_end_msg $? --- /etc/udev/rules.d/85-ifupdown.rules.ori 2007-12-04 01:17:38.000000000 +0200 +++ /etc/udev/rules.d/85-ifupdown.rules 2007-12-04 01:13:35.000000000 +0200 @@ -1,9 +1,12 @@ # This file causes network devices to be brought up or down as a result # of hardware being added or removed, including that which isn't ordinarily # removable. +# See udev(8) for syntax. -SUBSYSTEM!="net", GOTO="net_end" +SUBSYSTEM=="net", TEST=="/var/run/network/initialized", GOTO="net_start" +GOTO="net_end" + +LABEL="net_start" # Bring devices up and down only if they're marked auto. # Use start-stop-daemon so we don't wait on dhcp