diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-01-17 04:49:07 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-01-17 04:49:12 -0500 |
commit | faa2df11597cf496205d3d629e3b3147b569afc8 (patch) | |
tree | 6e1db42c42365087686f48dbe9c39515de03f4ab /net | |
parent | 711713d6642eff155bfede8a2dd213824016b76c (diff) |
more whitespace cleanup
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/apipa.sh | 2 | ||||
-rw-r--r-- | net/arping.sh | 8 | ||||
-rw-r--r-- | net/bonding.sh | 2 | ||||
-rw-r--r-- | net/br2684ctl.sh | 6 | ||||
-rw-r--r-- | net/bridge.sh | 6 | ||||
-rw-r--r-- | net/ccwgroup.sh | 6 | ||||
-rw-r--r-- | net/clip.sh | 2 | ||||
-rw-r--r-- | net/ifconfig.sh.Linux.in | 6 | ||||
-rw-r--r-- | net/ifplugd.sh | 4 | ||||
-rw-r--r-- | net/ifwatchd.sh | 2 | ||||
-rw-r--r-- | net/ip6to4.sh | 4 | ||||
-rw-r--r-- | net/iproute2.sh | 6 | ||||
-rw-r--r-- | net/iwconfig.sh.BSD.in | 6 | ||||
-rw-r--r-- | net/iwconfig.sh.Linux.in | 24 | ||||
-rw-r--r-- | net/macchanger.sh | 2 | ||||
-rw-r--r-- | net/netplugd.sh | 4 | ||||
-rw-r--r-- | net/pppd.sh | 8 | ||||
-rw-r--r-- | net/pump.sh | 4 | ||||
-rw-r--r-- | net/system.sh | 8 | ||||
-rw-r--r-- | net/vlan.sh | 4 | ||||
-rw-r--r-- | net/wpa_supplicant.sh | 4 |
21 files changed, 59 insertions, 59 deletions
diff --git a/net/apipa.sh b/net/apipa.sh index f4e5f73d..0ca3bdad 100644 --- a/net/apipa.sh +++ b/net/apipa.sh @@ -21,7 +21,7 @@ apipa_start() local iface="$1" i1= i2= addr= i=0 _exists true || return 1 - + einfo "Searching for free addresses in 169.254.0.0/16" eindent diff --git a/net/arping.sh b/net/arping.sh index 307e8ef8..b04f05dc 100644 --- a/net/arping.sh +++ b/net/arping.sh @@ -19,7 +19,7 @@ arping_address() esac # We need to bring the interface up to test - _exists "${iface}" || return 1 + _exists "${iface}" || return 1 _up "${iface}" eval w=\$arping_wait_${IFVAR} @@ -43,7 +43,7 @@ arping_address() sed -n -e 'y/abcdef/ABCDEF/' -e 's/.*\[\([^]]*\)\].*/\1/p')" fi [ -z "${foundmac}" ] && return 1 - + if [ -n "${mac}" ]; then if [ "${mac}" != "${foundmac}" ]; then vewarn "Found ${ip} but MAC ${foundmac} does not match" @@ -74,7 +74,7 @@ arping_start() fi eindent - + for x in ${gateways}; do local IFS=, set -- ${x} @@ -119,7 +119,7 @@ arping_start() fi done unset IFS - + _load_config return 0 fi diff --git a/net/bonding.sh b/net/bonding.sh index 415306c5..209d4f07 100644 --- a/net/bonding.sh +++ b/net/bonding.sh @@ -115,7 +115,7 @@ bonding_pre_start() bonding_stop() { - _is_bond || return 0 + _is_bond || return 0 local slaves= s= slaves=$( \ diff --git a/net/br2684ctl.sh b/net/br2684ctl.sh index 3eea0d9b..77dafc93 100644 --- a/net/br2684ctl.sh +++ b/net/br2684ctl.sh @@ -17,7 +17,7 @@ br2684ctl_depend() } _config_vars="$_config_vars bridge bridge_add brctl" - + br2684ctl_pre_start() { local opts= @@ -40,7 +40,7 @@ br2684ctl_pre_start() return 1 ;; esac - + einfo "Starting RFC 2684 Bridge control on ${IFACE}" start-stop-daemon --start --exec $(_br2684ctl) --background \ --make-pidfile --pidfile "/var/run/br2684ctl-${IFACE}.pid" \ @@ -52,7 +52,7 @@ br2684ctl_post_stop() { local pidfile="/var/run/br2684ctl-${IFACE}.pid" [ -e "${pidfile}" ] || return 0 - + einfo "Stopping RFC 2684 Bridge control on ${IFACE}" start-stop-daemon --stop --quiet --pidfile "${pidfile}" eend $? diff --git a/net/bridge.sh b/net/bridge.sh index c0172ed7..234a640f 100644 --- a/net/bridge.sh +++ b/net/bridge.sh @@ -38,13 +38,13 @@ bridge_pre_start() local opts="$(_get_array "brctl_${IFVAR}")" # brif is used for dynamic add eval brif=\$bridge_add_${IFVAR} - + # we need a way to if the bridge exists in a variable name, not just the # contents of a variable. Eg if somebody has only bridge_add_eth0='br0', # with no other lines mentioning br0. eval bridge_unset=\${bridge_${IFVAR}-y\} eval brctl_unset=\${brctl_${IFVAR}-y\} - + if [ -z "${brif}" -a "${brctl_unset}" == 'y' ]; then if [ -z "${ports}" -a "${bridge_unset}" == "y" ]; then #eerror "Misconfigured static bridge detected (see net.example)" @@ -186,6 +186,6 @@ bridge_post_stop() brctl delbr "${iface}" eend $? fi - + return 0 } diff --git a/net/ccwgroup.sh b/net/ccwgroup.sh index cf08943b..6fcba1dd 100644 --- a/net/ccwgroup.sh +++ b/net/ccwgroup.sh @@ -5,7 +5,7 @@ _config_vars="$_config_vars ccwgroup" ccwgroup_depend() { - before interface + before interface } ccwgroup_pre_start() @@ -42,7 +42,7 @@ ccwgroup_pre_stop() { # Erase any existing ccwgroup to be safe service_set_value ccwgroup_device "" - + [ ! -L /sys/class/net/"${FACE}"/driver ] && return 0 local driver="$(readlink /sys/class/net/"${IFACE}"/driver)" case "${diver}" in @@ -59,7 +59,7 @@ ccwgroup_post_stop() { local device="$(service_get_value ccwgroup_device)" [ -z "${device}" ] && return 0 - + einfo "Disabling ccwgroup on ${iface}" echo "0" >/sys/devices/qeth/"${device}"/online echo "1" >/sys/devices/qeth/"${device}"/ungroup diff --git a/net/clip.sh b/net/clip.sh index 3cb84e79..35efa3f5 100644 --- a/net/clip.sh +++ b/net/clip.sh @@ -97,7 +97,7 @@ clip_pre_start() return 1 fi fi - + local started_here= if ! are_atmclip_svcs_running; then atmclip_svcs_start || return 1 diff --git a/net/ifconfig.sh.Linux.in b/net/ifconfig.sh.Linux.in index 74fcc9f4..f5c2064e 100644 --- a/net/ifconfig.sh.Linux.in +++ b/net/ifconfig.sh.Linux.in @@ -139,7 +139,7 @@ _add_address() return 0 fi - case "$1" in + case "$1" in *:*) ifconfig "${IFACE}" inet6 add "$@"; return $?;; esac @@ -225,7 +225,7 @@ _delete_addresses() while true; do local addr=$(_get_inet_address) [ -z "${addr}" ] && break - + if [ "${addr}" = "127.0.0.1/8" ]; then # Don't delete the loopback address [ "${IFACE}" = "lo" -o "${IFACE}" = "lo0" ] && break @@ -246,7 +246,7 @@ _delete_addresses() einfo "${addr}" ifconfig "${IFACE}" inet6 del "${addr}" done - + return 0 } diff --git a/net/ifplugd.sh b/net/ifplugd.sh index 58317207..9f6c8846 100644 --- a/net/ifplugd.sh +++ b/net/ifplugd.sh @@ -57,7 +57,7 @@ ifplugd_pre_start() ewarn "WARNING: infinite timeout set for ${IFACE} to come up" elif [ ${timeout} -lt 0 ]; then einfo "Backgrounding ..." - exit 1 + exit 1 fi veinfo "Waiting for ${IFACE} to be marked as started" @@ -84,7 +84,7 @@ ifplugd_stop() local pidfile="/var/run/ifplugd.${IFACE}.pid" [ ! -e "${pidfile}" ] && return 0 - + ebegin "Stopping ifplugd on ${IFACE}" start-stop-daemon --stop --quiet --exec /usr/sbin/ifplugd \ --pidfile "${pidfile}" --signal QUIT diff --git a/net/ifwatchd.sh b/net/ifwatchd.sh index d9da15eb..4e6b1c63 100644 --- a/net/ifwatchd.sh +++ b/net/ifwatchd.sh @@ -50,7 +50,7 @@ ifwatchd_stop() -- -c "${RC_LIBEXECDIR}/sh/ifwatchd-carrier.sh" \ -n "${RC_LIBEXECDIR}/sh/ifwatchd-nocarrier.sh" "${IFACE}" \ || return 0 - + ebegin "Stopping ifwatchd on" "${IFACE}" start-stop-daemon --stop --exec /usr/sbin/ifwatchd \ -- -c "${RC_LIBEXECDIR}/sh/ifwatchd-carrier.sh" \ diff --git a/net/ip6to4.sh b/net/ip6to4.sh index 6bddb7ed..23494290 100644 --- a/net/ip6to4.sh +++ b/net/ip6to4.sh @@ -56,7 +56,7 @@ ip6to4_start() [ ${i} -lt 32 ] && continue ;; esac - + veinfo "IPv4 address on ${host}: ${ip}/${subnet}" local ipa= ip6= IFS="${IFS}." for i in ${ip}; do @@ -87,7 +87,7 @@ ip6to4_start() eend $? || return 1 _up fi - + # Now apply our config eval config_${config_index}=\'"${new}"\' config_index=$((${config_index} - 1)) diff --git a/net/iproute2.sh b/net/iproute2.sh index 1cd4f420..4841c106 100644 --- a/net/iproute2.sh +++ b/net/iproute2.sh @@ -117,14 +117,14 @@ _add_address() shift; shift; shift set -- "${one}/$(_netmask2cidr "${three}")" "$@" fi - + # tunnel keyword is 'peer' in iproute2, but 'pointopoint' in ifconfig. if [ "$2" = "pointopoint" ]; then local one="$1" shift; shift set -- "${one}" "peer" "$@" fi - + # Always scope lo addresses as host unless specified otherwise if [ "${IFACE}" = "lo" ]; then set -- "$@" "scope" "host" @@ -162,7 +162,7 @@ _add_route() set -- "${one}" "${two}" via "$@" fi - local cmd= have_metric=false + local cmd= have_metric=false while [ -n "$1" ]; do case "$1" in metric) cmd="${cmd} $1"; have_metric=true;; diff --git a/net/iwconfig.sh.BSD.in b/net/iwconfig.sh.BSD.in index ec88e66a..f94246b4 100644 --- a/net/iwconfig.sh.BSD.in +++ b/net/iwconfig.sh.BSD.in @@ -477,7 +477,7 @@ iwconfig_defaults() #ifconfig "${iface}" txpower 100 2>/dev/null ifconfig "${IFACE}" bssid - ifconfig "${IFACE}" ssid - - ifconfig "${IFACE}" wepkey 1:- wepkey 2:- wepkey 3:- wepkey 4:- + ifconfig "${IFACE}" wepkey 1:- wepkey 2:- wepkey 3:- wepkey 4:- ifconfig "${IFACE}" authmode open ifconfig "${IFACE}" -mediaopt adhoc ifconfig "${IFACE}" -mediaopt hostap @@ -563,8 +563,8 @@ iwconfig_pre_start() return 0 fi - iwconfig_defaults - iwconfig_user_config + iwconfig_defaults + iwconfig_user_config # Set the base metric to be 2000 metric=2000 diff --git a/net/iwconfig.sh.Linux.in b/net/iwconfig.sh.Linux.in index 28cdd236..600ffe7f 100644 --- a/net/iwconfig.sh.Linux.in +++ b/net/iwconfig.sh.Linux.in @@ -47,7 +47,7 @@ _get_ssid() _get_ap_mac_address() { - local mac="$(iwgetid --raw --ap "${IFACE}")" + local mac="$(iwgetid --raw --ap "${IFACE}")" case "${mac}" in "00:00:00:00:00:00") return 1;; "44:44:44:44:44:44") return 1;; @@ -163,7 +163,7 @@ iwconfig_setup_specific() local key=$(iwconfig_get_wep_key) iwconfig_set_mode "${mode}" - + # Now set the key if ! eval iwconfig "${IFACE}" key "${key}"; then if [ "${key}" != "off" ]; then @@ -185,10 +185,10 @@ iwconfig_setup_specific() ewarn "${IFACE} does not support setting the channel to \"${channel:-3}\"" return 1 fi - + # Finally apply the user Config iwconfig_user_config - + iwconfig_report return 0 } @@ -226,7 +226,7 @@ iwconfig_wait_for_association() /proc/net/wireless)" != "0" ] && return 0 fi fi - + sleep 1 [ ${timeout} -eq 0 ] && continue i=$((${i} + 1)) @@ -281,7 +281,7 @@ iwconfig_associate() iwconfig "${IFACE}" freq "${freq}" fi [ -n "${mac}" ] && iwconfig "${IFACE}" ap "${mac}" - + # Finally apply the user Config iwconfig_user_config @@ -377,10 +377,10 @@ iwconfig_scan() for line; do case "${line}" in *Address:*) - APS=$((${APS} + 1)) + APS=$((${APS} + 1)) eval MAC_${APS}="\""$(echo "${line#*: }" | tr '[:lower:]' '[:upper:]')"\"" eval QUALITY_${APS}=0 - ;; + ;; *ESSID:*) x=${line#*\"} x=${x%*\"} @@ -455,7 +455,7 @@ iwconfig_scan() eval a=\$QUALITY_${i} eval b=\$QUALITY_${k} local u=${k} - # We need to split this into two tests, otherwise bash errors + # We need to split this into two tests, otherwise bash errors [ -n "${a}" -a -n "${b}" ] && [ "${a}" -lt "${b}" ] && u=${i} unset MAC_${u} SSID_${u} MODE_${u} CHAN_${u} QUALITY_${u} ENC_${u} fi @@ -581,7 +581,7 @@ iwconfig_connect_not_preferred() break fi done - + if ! ${pref}; then SSID=${e} eval mode=\$MODE_${i} @@ -711,10 +711,10 @@ iwconfig_pre_start() # wait if our scan returns nothing LC_ALL=C iwconfig "${IFACE}" | sed -e '1d' | grep -q "Tx-Power=off" local txpowerwasoff=$? - + iwconfig_defaults iwconfig_user_config - + # Set the base metric to be 2000 metric=2000 diff --git a/net/macchanger.sh b/net/macchanger.sh index 32bbdc9b..9126d302 100644 --- a/net/macchanger.sh +++ b/net/macchanger.sh @@ -24,7 +24,7 @@ macchanger_pre_start() # The interface needs to be up for macchanger to work most of the time _down - + mac=$(echo "${mac}" | tr '[:upper:]' '[:lower:]') local hex="[0-9a-f][0-9a-f]" case "${mac}" in diff --git a/net/netplugd.sh b/net/netplugd.sh index 0f466436..8f36ef2d 100644 --- a/net/netplugd.sh +++ b/net/netplugd.sh @@ -59,7 +59,7 @@ netplugd_pre_start() ewarn "WARNING: infinite timeout set for ${IFACE} to come up" elif [ ${timeout} -lt 0 ]; then einfo "Backgrounding ..." - exit 1 + exit 1 fi veinfo "Waiting for ${IFACE} to be marked as started" @@ -86,7 +86,7 @@ netplugd_stop() local pidfile="/var/run/netplugd-${IFACE}.pid" [ ! -e "${pidfile}" ] && return 0 - + ebegin "Stopping netplug on" "${IFACE}" start-stop-daemon --stop --quiet --exec /sbin/netplugd \ --pidfile "${pidfile}" diff --git a/net/pppd.sh b/net/pppd.sh index a8c88820..c7cfa441 100644 --- a/net/pppd.sh +++ b/net/pppd.sh @@ -31,7 +31,7 @@ pppd_pre_start() if yesno ${IN_BACKGROUND}; then local config= eval config=\$config_${IFVAR} - # If no config for ppp then don't default to DHCP + # If no config for ppp then don't default to DHCP if [ -z "${config}" ]; then eval config_${IFVAR}=null fi @@ -39,7 +39,7 @@ pppd_pre_start() fi local link= i= unit="${IFACE#ppp}" opts= - + # PPP requires a link to communicate over - normally a serial port # PPPoE communicates over Ethernet # PPPoA communicates over ATM @@ -92,7 +92,7 @@ pppd_pre_start() && [ -n "${password}" -o -z "${passwordset}" ]; then opts="plugin passwordfd.so ${opts} passwordfd 0" fi - + if ! ${hasdefaultmetric}; then local m= eval m=\$metric_${IFVAR} @@ -122,7 +122,7 @@ pppd_pre_start() # Set unit opts="unit ${unit} ${opts}" - + # Setup connect script local chatprog="/usr/sbin/chat -e -E -v" phone= eval phone=\$phone_number_${IFVAR} diff --git a/net/pump.sh b/net/pump.sh index d03e2c8d..ecceff02 100644 --- a/net/pump.sh +++ b/net/pump.sh @@ -35,7 +35,7 @@ pump_start() ebegin "Running pump" eval pump "${args}" - eend $? || return 1 + eend $? || return 1 _show_address return 0 @@ -48,7 +48,7 @@ pump_stop() start-stop-daemon --quiet --test --stop --exec /sbin/pump || return 0 # Check that pump is running on the interface - if ! pump --status --interface "${IFACE}" >/dev/null 2>&1; then + if ! pump --status --interface "${IFACE}" >/dev/null 2>&1; then return 0 fi diff --git a/net/system.sh b/net/system.sh index b22eee67..6680a7d1 100644 --- a/net/system.sh +++ b/net/system.sh @@ -80,10 +80,10 @@ _system_nis() eval servers=\$nis_servers_${IFVAR} [ -z "${servers}" ] && servers=${nis_servers} - + eval domain=\$nis_domain_${IFVAR} [ -z "${domain}" ] && domain=${nis_domain} - + [ -z "${servers}" -a -z "${domain}" ] && return 0 buffer="# Generated by net-scripts for interface ${iface}\n" @@ -110,8 +110,8 @@ _system_nis() system_pre_start() { _system_dns - _system_ntp - _system_nis + _system_ntp + _system_nis return 0 } diff --git a/net/vlan.sh b/net/vlan.sh index c2450515..5cd49570 100644 --- a/net/vlan.sh +++ b/net/vlan.sh @@ -68,7 +68,7 @@ vlan_post_start() local vlans= eval vlans=\$vlans_${IFVAR} [ -z "${vlans}" ] && return 0 - + _check_vlan || return 1 _exists || return 1 @@ -95,7 +95,7 @@ vlan_post_start() start ) || mark_service_stopped "net.${ifname}" done - + return 0 } diff --git a/net/wpa_supplicant.sh b/net/wpa_supplicant.sh index 379e6153..c619f99b 100644 --- a/net/wpa_supplicant.sh +++ b/net/wpa_supplicant.sh @@ -149,7 +149,7 @@ wpa_supplicant_pre_start() if [ -z "${wpac}" ]; then if service_started devd; then ebegin "Backgrounding ..." - exit 1 + exit 1 fi return 0 fi @@ -167,7 +167,7 @@ wpa_supplicant_pre_start() -P "/var/run/wpa_cli-${IFACE}.pid" -B if eend $?; then ebegin "Backgrounding ..." - exit 1 + exit 1 fi # wpa_cli failed to start? OK, error here |