.override also becomes net.* file only after successful rootfs mount.
authorWarren Togami <wtogami@redhat.com>
Wed, 10 Jun 2009 18:02:45 +0000 (14:02 -0400)
committerWarren Togami <wtogami@redhat.com>
Wed, 10 Jun 2009 18:02:45 +0000 (14:02 -0400)
modules.d/40network/dhclient-script
modules.d/40network/ifup
modules.d/40network/netroot

index 8997477..3cc48c8 100755 (executable)
@@ -36,7 +36,7 @@ search=$new_domain_search
 namesrv=$new_domain_name_servers
 hostname=$new_host_name
 
-[ -f /tmp/net.$interface.override ] && . /tmp/net.$interface.override
+[ -f /tmp/dhclient.$interface.override ] && . /tmp/dhclient.$interface.override
 
 # save the offending command and let udev move on if we have an error
 trap 'log_err; exit 0' EXIT
index 9e23274..1f0587f 100755 (executable)
@@ -64,8 +64,8 @@ do_dhcp() {
 
     for i in ip srv gw mask hostname; do
        eval '[ "$'$i'" ] && echo '$i'="$'$i'"'
-    done > /tmp/net.$netif.override
-    [ -n "$ip" ] && echo bcast= >> /tmp/net.$netif.override
+    done > /tmp/dhclient.$netif.override
+    [ -n "$ip" ] && echo bcast= >> /tmp/dhclient.$netif.override
 
     # /sbin/dhclient-script will mark the netif up and generate the online
     # event for nfsroot
index cd988e9..b61e2fc 100755 (executable)
@@ -50,6 +50,7 @@ if $handler $netif $root; then
     # Network rootfs mount successful
     [ -f /tmp/dhclient.$netif.lease ] &&    cp /tmp/dhclient.$netif.lease    /tmp/net.$netif.lease
     [ -f /tmp/dhclient.$netif.dhcpopts ] && cp /tmp/dhclient.$netif.dhcpopts /tmp/net.$netif.dhcpopts
+    [ -f /tmp/dhclient.$netif.override ] && cp /tmp/dhclient.$netif.override /tmp/net.$netif.override
     cat /sys/class/net/eth0/address > /tmp/net.$netif.hwaddr
     echo "# Generated by dracut initrd" > /tmp/net.$netif.ifcfg
     echo "DEVICE=$netif" >> /tmp/net.$netif.ifcfg