netroot: Don't export NEWROOT

Exporting NEWROOT to handlers when we already pass them two other
arguments doesn't make sense. Passing it as a third argument is
better.
master
Philippe Seewer 2009-06-16 10:46:30 +02:00
parent d1a55b113d
commit 9cdfd735a8
3 changed files with 3 additions and 2 deletions

View File

@ -45,8 +45,7 @@ fi

# Run the handler; don't store the root, it may change from device to device
# XXX other variables to export?
export NEWROOT
if $handler $netif $netroot; then
if $handler $netif $netroot $NEWROOT; 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

View File

@ -15,6 +15,7 @@ fi
# root is in the form root=nbd:server:port:fstype:fsopts:nbdopts
netif="$1"
root="$2"
NEWROOT="$3"

root=${root#nbd:}
nbdserver=${root%%:*}; root=${root#*:}

View File

@ -15,6 +15,7 @@ getarg rdnetdebug && {
# root is in the form root=nfs[4]:server:path:[options]
netif="$1"
root="$2"
NEWROOT="$3"

nfsver=${root%%:*}; root=${root#*:}
nfsserver=${root%%:*}; root=${root#*:}