Browse Source

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 16 years ago
parent
commit
9cdfd735a8
  1. 3
      modules.d/40network/netroot
  2. 1
      modules.d/95nbd/nbdroot
  3. 1
      modules.d/95nfs/nfsroot

3
modules.d/40network/netroot

@ -45,8 +45,7 @@ fi @@ -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

1
modules.d/95nbd/nbdroot

@ -15,6 +15,7 @@ fi @@ -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#*:}

1
modules.d/95nfs/nfsroot

@ -15,6 +15,7 @@ getarg rdnetdebug && { @@ -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#*:}

Loading…
Cancel
Save