]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
40network/ifup: be more verbose
authorHarald Hoyer <harald@redhat.com>
Wed, 19 May 2010 07:33:58 +0000 (09:33 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 19 May 2010 07:33:58 +0000 (09:33 +0200)
modules.d/40network/ifup

index e2237efe88638388b939275ae87172d031bf4832..6ef101046aef7b2f16bf2a17548b553eef21174f 100755 (executable)
@@ -12,7 +12,9 @@ do_dhcp() {
     # /sbin/dhclient-script will mark the netif up and generate the online
     # event for nfsroot
     # XXX add -V vendor class and option parsing per kernel
-    dhclient "$@" -1 -q -cf /etc/dhclient.conf -pf /tmp/dhclient.$netif.pid -lf /tmp/dhclient.$netif.lease $netif
+    echo "Starting dhcp for interface $netif"
+    dhclient "$@" -1 -q -cf /etc/dhclient.conf -pf /tmp/dhclient.$netif.pid -lf /tmp/dhclient.$netif.lease $netif \
+    || echo "dhcp failed"
 }
 
 load_ipv6() {
@@ -78,14 +80,10 @@ do_static() {
 
 PATH=$PATH:/sbin:/usr/sbin
 
+export PS4="ifup.$1.$$ + "
+exec >>/dev/initlog.pipe 2>>/dev/initlog.pipe
 . /lib/dracut-lib.sh
 
-if getarg rdnetdebug ; then
-    exec >/tmp/ifup.$1.$$.out
-    exec 2>>/tmp/ifup.$1.$$.out
-    set -x
-fi
-
 # Huh? No $1?
 [ -z "$1" ] && exit 1