.override also becomes net.* file only after successful rootfs mount.
parent
9a9777a19c
commit
f3d9b04d1a
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue