dhclient.* files become net.* only after successful netboot
Somehow the final chunk of this patch isn't working. Isn't that part supposed to happen only on the occasion where netroot is successfully mounted? I seem to be missing something simple here...
Warren Togami
[email protected]
From 11f573d4564e34846011c8771f78ac001bc51b1c Mon Sep 17 00:00:00 2001
From: Warren Togami <[email protected]>
Date: Wed, 10 Jun 2009 00:57:05 -0400
Subject: [PATCH] dhclient.* files become net.* only after successful netboot.
This is an attempt to avoid confusing post-boot scripts by having them consider only net.* files.
--- modules.d/40network/dhclient-script | 2 +- modules.d/40network/ifup | 4 ++-- modules.d/40network/netroot | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-)
modules.d/40network/dhclient-script +1 -1
@@ -75,7 +75,7 @@ case $reason in 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 ;;
modules.d/40network/ifup +2 -2
@@ -51,7 +51,7 @@ do_static() { 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
@@ -70,7 +70,7 @@ 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 -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() {
modules.d/40network/netroot +2 -0
@@ -47,6 +47,8 @@ fi # XXX other variables to export? export NEWROOT if $handler $netif $root; then + cp /tmp/dhclient.$netif.lease /tmp/net.$netif.lease + cp /tmp/dhclient.$netif.dhcpopts /tmp/net.$netif.dhcpopts >/tmp/netroot.done fi exit 0
Signature · 1 line
1.6.2.2
Quoted 6 lines · Warren Togami
Somehow the final chunk of this patch isn't working. Isn't that part supposed to happen only on the occasion where netroot is successfully mounted? I seem to be missing something simple here...
Warren Togami
[email protected]
is "cp" installed in the initramfs?
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html