summaryrefslogtreecommitdiffstats
path: root/etc/rc.initdiskless
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-04-27 15:42:34 +0000
committerphk <phk@FreeBSD.org>2004-04-27 15:42:34 +0000
commit6289df2735b08fa9285dbc4745dda45eb67e7f6b (patch)
tree1cd384b1bb2258b0c785da62818246401f44b8f2 /etc/rc.initdiskless
parentba24b2b7e26e91213a66b83d68b7e87dde58ff78 (diff)
downloadFreeBSD-src-6289df2735b08fa9285dbc4745dda45eb67e7f6b.zip
FreeBSD-src-6289df2735b08fa9285dbc4745dda45eb67e7f6b.tar.gz
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"
Diffstat (limited to 'etc/rc.initdiskless')
-rw-r--r--etc/rc.initdiskless3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/rc.initdiskless b/etc/rc.initdiskless
index 47ab3ec..16ca8cf 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"
OpenPOWER on IntegriCloud