From edf28a672b20808388e3b298989db2d11e470ae9 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 27 Apr 2004 15:42:34 +0000 Subject: [PATCH] When using this in non-NFSroot circumstances, `mount -t nfs` may return empty. Add a dummy element to prevent the alternate action of the shell builtin "set" --- etc/rc.d/initdiskless | 3 ++- etc/rc.initdiskless | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/rc.d/initdiskless b/etc/rc.d/initdiskless index 47ab3ec5bba6..16ca8cf86b59 100644 --- a/etc/rc.d/initdiskless +++ b/etc/rc.d/initdiskless @@ -202,7 +202,8 @@ fi # Figure out our NFS root path # -set `mount -t nfs` +# The 'x' is there in case the list is empty. +set x `mount -t nfs` while [ $# -ge 1 ] ; do if [ "$2" = "on" -a "$3" = "/" ]; then nfsroot="$1" diff --git a/etc/rc.initdiskless b/etc/rc.initdiskless index 47ab3ec5bba6..16ca8cf86b59 100644 --- a/etc/rc.initdiskless +++ b/etc/rc.initdiskless @@ -202,7 +202,8 @@ fi # Figure out our NFS root path # -set `mount -t nfs` +# The 'x' is there in case the list is empty. +set x `mount -t nfs` while [ $# -ge 1 ] ; do if [ "$2" = "on" -a "$3" = "/" ]; then nfsroot="$1"