summaryrefslogtreecommitdiffstats
path: root/etc/rc.initdiskless
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-04-28 09:09:27 +0000
committerru <ru@FreeBSD.org>2004-04-28 09:09:27 +0000
commitcb5b33962a02c8d84de1cbf2cf894d5f8399807c (patch)
tree8a431999f2a76a3d266e251e272228964edfb951 /etc/rc.initdiskless
parent0de7ed8edec107472961f7083a442fabaf962040 (diff)
downloadFreeBSD-src-cb5b33962a02c8d84de1cbf2cf894d5f8399807c.zip
FreeBSD-src-cb5b33962a02c8d84de1cbf2cf894d5f8399807c.tar.gz
Replace shell's positional parameters safely.
Diffstat (limited to 'etc/rc.initdiskless')
-rw-r--r--etc/rc.initdiskless5
1 files changed, 2 insertions, 3 deletions
diff --git a/etc/rc.initdiskless b/etc/rc.initdiskless
index 16ca8cf..1609fa8 100644
--- a/etc/rc.initdiskless
+++ b/etc/rc.initdiskless
@@ -178,7 +178,7 @@ bootp_ipbca=""
if [ ${dlv:=0} -ne 0 ] ; then
iflist=`ifconfig -l`
for i in ${iflist} ; do
- set `ifconfig ${i}`
+ set -- `ifconfig ${i}`
while [ $# -ge 1 ] ; do
if [ "${bootp_ifc}" = "" -a "$1" = "inet" ] ; then
bootp_ifc=${i} ; bootp_ipa=${2} ; shift
@@ -202,8 +202,7 @@ fi
# Figure out our NFS root path
#
-# The 'x' is there in case the list is empty.
-set x `mount -t nfs`
+set -- `mount -t nfs`
while [ $# -ge 1 ] ; do
if [ "$2" = "on" -a "$3" = "/" ]; then
nfsroot="$1"
OpenPOWER on IntegriCloud