Exporting NEWROOT to handlers when we already pass them two other
arguments doesn't make sense. Passing it as a third argument is
better.
# 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
# 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#*:}
# 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#*:}