]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
netroot: Don't export NEWROOT
authorPhilippe Seewer <philippe.seewer@bfh.ch>
Tue, 16 Jun 2009 08:46:30 +0000 (10:46 +0200)
committerPhilippe Seewer <philippe.seewer@bfh.ch>
Wed, 17 Jun 2009 06:37:39 +0000 (08:37 +0200)
Exporting NEWROOT to handlers when we already pass them two other
arguments doesn't make sense. Passing it as a third argument is
better.

modules.d/40network/netroot
modules.d/95nbd/nbdroot
modules.d/95nfs/nfsroot

index d874799395d9c59f3b7eb88088f160379fc646d2..75313ba9bf0faa23ced9fc48ad7ee9930ccd7a85 100755 (executable)
@@ -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
index b7f4cc402eedf3c136bbdc9ba3ca8a8fd6ac1930..2302696dd6f40926b0c850150b91f51f75711b74 100755 (executable)
@@ -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#*:}
index d0189be3cae7db1ae4acf12a8bfdca8083de2b87..849fadf3c361a6d41cd27eb1e136e0d916254ab1 100755 (executable)
@@ -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#*:}