From: Dave Young Date: Mon, 9 Jul 2012 06:56:35 +0000 (+0800) Subject: dhclient initqueue hook fix X-Git-Tag: 021~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a17fc9902e3ccd154765cbc8a1b7cc285072ad75;p=thirdparty%2Fdracut.git dhclient initqueue hook fix dhclient initqueue hook fix setup_net is scheduled in initqueue, sometimes it does not get chance to run So the default route will not be set properly Add a check in initqueue/finished to resolve this issue. Signed-off-by: Dave Young --- diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh index 470444ebc..1500fe51b 100755 --- a/modules.d/40network/dhclient-script.sh +++ b/modules.d/40network/dhclient-script.sh @@ -88,9 +88,11 @@ case $reason in echo "setup_net $netif" echo "source_hook initqueue/online $netif" [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif" + echo "> /tmp/setup_net_$netif.ok" echo "rm -f $hookdir/initqueue/setup_net_$netif.sh" } > $hookdir/initqueue/setup_net_$netif.sh + echo "[ -f /tmp/setup_net_$netif.ok ]" > $hookdir/initqueue/finished/dhclient-$netif.sh >/tmp/net.$netif.up ;; *) echo "dhcp: $reason";;