summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmodules.d/95cifs/cifsroot.sh2
-rwxr-xr-xmodules.d/95nfs/nfsroot.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules.d/95cifs/cifsroot.sh b/modules.d/95cifs/cifsroot.sh
index 7956d6f6..677318b1 100755
--- a/modules.d/95cifs/cifsroot.sh
+++ b/modules.d/95cifs/cifsroot.sh
@@ -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
diff --git a/modules.d/95nfs/nfsroot.sh b/modules.d/95nfs/nfsroot.sh
index 589d4ed7..ec0f3767 100755
--- a/modules.d/95nfs/nfsroot.sh
+++ b/modules.d/95nfs/nfsroot.sh
@@ -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