This is an attempt to avoid confusing post-boot scripts by having them
consider only net.* files.
setup_interface
set | while read line; do
[ "${line#new_}" = "$line" ] && continue
- echo "$line" >>/tmp/net.$netif.dhcpopts
+ echo "$line" >>/tmp/dhclient.$netif.dhcpopts
done
>/tmp/net.$netif.up
echo online > /sys/class/net/$netif/uevent ;;
hostname $hostname
}
[ -n "$srv" ] &&
- echo "new_dhcp_server_identifier=$srv" > /tmp/net.$netif.dhcpopts
+ echo "new_dhcp_server_identifier=$srv" > /tmp/dhclient.$netif.dhcpopts
>/tmp/net.$netif.up
echo online > /sys/class/net/$netif/uevent
# /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 -R ${reqs} -pf /tmp/dhclient.$netif.pid -lf /tmp/net.$netif.lease $netif
+ dhclient -1 -q -R ${reqs} -pf /tmp/dhclient.$netif.pid -lf /tmp/dhclient.$netif.lease $netif
}
ip_to_var() {
#
. /tmp/root.info
. /tmp/netroot.info
-[ -e /tmp/net.$netif.dhcpopts ] && . /tmp/net.$netif.dhcpopts
+[ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
# Now, let the installed network root handlers figure this out
#
# XXX other variables to export?
export NEWROOT
if $handler $netif $root; then
+ [ -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
>/tmp/netroot.done
fi
exit 0