Replace shell's positional parameters safely.
This commit is contained in:
parent
459336c4d8
commit
3ee3cd3165
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128706
@ -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"
|
||||
|
@ -48,7 +48,7 @@ if [ ! -e /etc/resolv.conf -a \
|
||||
echo domain `/bin/kenv dhcp.domain-name` > /etc/resolv.conf
|
||||
fi
|
||||
|
||||
set `/bin/kenv dhcp.domain-name-servers`
|
||||
set -- `/bin/kenv dhcp.domain-name-servers`
|
||||
for ns in `IFS=','; echo $*`; do
|
||||
echo nameserver $ns >> /etc/resolv.conf;
|
||||
done
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user