From 95f15c1589eee6e4b8147e21f3cde2264b00c55a Mon Sep 17 00:00:00 2001 From: Hiroki Sato Date: Mon, 13 Sep 2010 19:53:54 +0000 Subject: [PATCH] Localize $_punct_c in get_if_var() and whitespace clean-ups. Based on: changes in r206408 by dougb --- etc/network.subr | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/network.subr b/etc/network.subr index 8737c215b9ab..8097463d7358 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -194,7 +194,7 @@ ifconfig_down() # $default if given. get_if_var() { - local _if _punct _var _default prefix suffix + local _if _punct _punct_c _var _default prefix suffix if [ $# -ne 2 -a $# -ne 3 ]; then err 3 'USAGE: get_if_var name var [default]' @@ -505,7 +505,7 @@ ifexists() } # ipv4_up if -# add IPv4 addresses to the interface $if +# add IPv4 addresses to the interface $if ipv4_up() { local _if _ret @@ -615,14 +615,14 @@ ipv6_down() ipv4_addrs_common() { local _ret _if _action _cidr _cidr_addr - local _ipaddr _netmask _range _ipnet _iplow _iphigh _ipcount + local _ipaddr _netmask _range _ipnet _iplow _iphigh _ipcount _ret=1 _if=$1 _action=$2 - + # get ipv4-addresses cidr_addr=`get_if_var $_if ipv4_addrs_IF` - + for _cidr in ${cidr_addr}; do _ipaddr=${_cidr%%/*} _netmask="/"${_cidr##*/} @@ -635,7 +635,7 @@ ipv4_addrs_common() if [ "${_action}" = "-alias" ]; then _netmask="" fi - + _ipcount=${_iplow} while [ "${_ipcount}" -le "${_iphigh}" ]; do eval "ifconfig ${_if} ${_action} ${_ipnet}.${_ipcount}${_netmask}"