]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
[nfs|cifs]root.sh: make "/dev/root" a symlink, so it gets cleaned up later on
authorHarald Hoyer <harald@redhat.com>
Mon, 19 Nov 2012 15:59:30 +0000 (16:59 +0100)
committerHarald Hoyer <harald@redhat.com>
Mon, 19 Nov 2012 16:03:55 +0000 (17:03 +0100)
modules.d/95cifs/cifsroot.sh
modules.d/95nfs/nfsroot.sh

index 7956d6f6fe3ad02585c1ec444fcbfb48d13929ee..677318b10e782ba7f21cbf349afea6f66bbdac26 100755 (executable)
@@ -18,7 +18,7 @@ echo server: $server
 echo path: $path
 echo options: $options
 
-mount.cifs //$server/$path $NEWROOT -o $options && { [ -e /dev/root ] || >/dev/root ; }
+mount.cifs //$server/$path $NEWROOT -o $options && { [ -e /dev/root ] || ln -s null /dev/root ; }
 
 # inject new exit_if_exists
 echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/cifs.sh
index 589d4ed7d6fa6dde8229fe51b52477f687f14bff..ec0f3767e56f8aa9770adadc6d5361c69479d1fc 100755 (executable)
@@ -16,7 +16,7 @@ NEWROOT="$3"
 nfs_to_var $root $netif
 [ -z "$server" ] && die "Required parameter 'server' is missing"
 
-mount_nfs $root $NEWROOT $netif && { [ -e /dev/root ] || >/dev/root ; }
+mount_nfs $root $NEWROOT $netif && { [ -e /dev/root ] || ln -s null /dev/root ; }
 
 # inject new exit_if_exists
 echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/nfs.sh