more whitespace cleanup

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2011-01-17 04:49:07 -05:00
parent 711713d664
commit faa2df1159
50 changed files with 139 additions and 139 deletions

View File

@ -23,7 +23,7 @@
# We now support modular networking scripts which means we can easily
# add support for new interface types and modules while keeping
# compatibility with existing ones.
#
#
# Modules load by default if the package they need is installed. If
# you specify a module here that doesn't have its package installed
# then you get an error stating which package you need to install.
@ -212,7 +212,7 @@
# not find them in a scan
# "forcepreferredonly" means it forcibly connects to the APs in order and
# does not bother to scan
# "forceany" does the same as forcepreferred + connects to any other
# "forceany" does the same as forcepreferred + connects to any other
# available AP
# Default is "any"
#associate_order="any"
@ -266,13 +266,13 @@
# won't have associated then)
# If you're using anything else to configure wireless on your interface AND
# you have installed wpa_supplicant, you need to disable wpa_supplicant
# you have installed wpa_supplicant, you need to disable wpa_supplicant
#modules="!iwconfig !wpa_supplicant"
#or
#modules="!wireless"
##############################################################################
# WIRELESS SSID IN VARIABLES
# WIRELESS SSID IN VARIABLES
##############################################################################
# Remember to change SSID to your SSID.
# Say that your SSID is My NET - the line
@ -368,7 +368,7 @@
##############################################################################
# ADVANCED CONFIGURATION
#
#
# Four functions can be defined which will be called surrounding the
# start/stop operations. The functions are called with the interface
# name first so that one function can control multiple adapters. An extra two

View File

@ -24,7 +24,7 @@
# We now support modular networking scripts which means we can easily
# add support for new interface types and modules while keeping
# compatibility with existing ones.
#
#
# Modules load by default if the package they need is installed. If
# you specify a module here that doesn't have its package installed
# then you get an error stating which package you need to install.
@ -49,7 +49,7 @@
##############################################################################
# INTERFACE HANDLERS
#
#
# We provide two interface handlers presently: ifconfig and iproute2.
# You need one of these to do any kind of network configuration.
# For ifconfig support, emerge sys-apps/net-tools
@ -297,7 +297,7 @@
# Surround each SSID with the " character and separate them with a space
# If the first SSID isn't found then it moves onto the next
# If this isn't defined then it connects to the first one found
#preferred_aps="SSID1 SSID2"
#preferred_aps="SSID1 SSID2"
# You can also define a preferred_aps list per interface
#preferred_aps_eth0="SSID3 SSID4"
@ -371,13 +371,13 @@
# won't have associated then)
# If you're using anything else to configure wireless on your interface AND
# you have installed wpa_supplicant, you need to disable wpa_supplicant
# you have installed wpa_supplicant, you need to disable wpa_supplicant
#modules="!iwconfig !wpa_supplicant"
#or
#modules="!wireless"
##############################################################################
# WIRELESS SSID IN VARIABLES
# WIRELESS SSID IN VARIABLES
##############################################################################
# Remember to change SSID to your SSID.
# Say that your SSID is My NET - the line
@ -421,7 +421,7 @@
# Notes:
# - All clients send the current hostname to the DHCP server by default
# - dhcpcd does not daemonize when the lease time is infinite
# - udhcp-0.9.3-r3 and earlier do not support getting NTP servers
# - udhcp-0.9.3-r3 and earlier do not support getting NTP servers
# - pump does not support getting NIS servers
# - DHCP tends to erase any existing device information - so add
# static addresses after dhcp if you need them
@ -467,7 +467,7 @@
#fallback_eth0="apipa"
#-----------------------------------------------------------------------------
# ARPING Gateway configuration
# ARPING Gateway configuration
# and
# Automatic Private IP Addressing (APIPA)
# For arpingnet / apipa support, emerge net-misc/iputils or net-analyzer/arping
@ -582,7 +582,7 @@
#-----------------------------------------------------------------------------
# Classical IP over ATM
# Classical IP over ATM
# For CLIP support emerge net-dialup/linux-atm
# Ensure that you have /etc/atmsigd.conf setup correctly
@ -620,7 +620,7 @@
#
# Here you should specify what pppd plugins you want to use
# Available plugins are: pppoe, pppoa, capi, dhcpc, minconn, radius,
# radattr, radrealms and winbind
# radattr, radrealms and winbind
#plugins_ppp0="pppoe" # Required plugin for PPPoE
#plugins_ppp0="pppoa vc-encaps" # Required plugin for PPPoA with an option
#plugins_ppp0="capi" # Required plugin for ISDN
@ -660,7 +660,7 @@
# lcp-echo-interval 15 # Send a LCP echo every 15 seconds
# lcp-echo-failure 3 # Make peer dead after 3 consecutive
# # echo-requests
#
#
# Compression options - use these to completely disable compression
# noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp
#
@ -793,7 +793,7 @@
# empty value variable is fine, but at least one of them must be set:
# brctl_IFVAR
# You need to configure the ports to null values so dhcp does not get started
# You need to configure the ports to null values so dhcp does not get started
#config_eth0="null"
#config_eth1="null"
@ -820,7 +820,7 @@
#hairpin_mode_eth0="1"
#-----------------------------------------------------------------------------
# RFC 2684 Bridge Support
# RFC 2684 Bridge Support
# For RFC 2684 bridge support emerge net-misc/br2684ctl
# Interface names have to be of the form nas0, nas1, nas2, etc.
@ -975,7 +975,7 @@
##############################################################################
# ADVANCED CONFIGURATION
#
#
# Four functions can be defined which will be called surrounding the
# start/stop operations. The functions are called with the interface
# name first so that one function can control multiple adapters. An extra two
@ -1001,7 +1001,7 @@
# if mii-tool "${IFACE}" 2> /dev/null | grep -q 'no link'; then
# ewarn "No link on ${IFACE}, aborting configuration"
# return 1
# fi
# fi
#
# # Test for link on the interface prior to bringing it up. This
# # only works on some network adapters and requires the ethtool

View File

@ -95,7 +95,7 @@
# We can set some things on a per service basis, like the nicelevel.
#export SSD_NICELEVEL="-19"
# Pass ulimit parameters
# Pass ulimit parameters
#rc_ulimit="-u 30"
# It's possible to define extra dependencies for services like so

View File

@ -6,7 +6,7 @@
# This gives us a nice colour boot :)
[ -z "$TERM" -o "$TERM" = "dumb" ] && export TERM="@TERM@"
# Handle interrupts
# Handle interrupts
trap : SIGINT
trap "echo 'Boot interrupted'; exit 1" SIGQUIT

View File

@ -2,7 +2,7 @@
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
# All rights reserved. Released under the 2-clause BSD license.
# Handle interrupts
# Handle interrupts
trap : SIGINT SIGQUIT
# Try and use stuff in /lib over anywhere else so we can shutdown

View File

@ -10,7 +10,7 @@ required_files=/etc/dnsmasq.conf
extra_started_commands="reload"
depend()
{
{
provide dns
need localmount net
after bootmisc

View File

@ -24,7 +24,7 @@ if yesno $openvpn_client; then
command_args="$command_args --up $openvpn_up"
command_args="$command_args --down $openvpn_down"
required_files="$required_files $openvpn_up $openvpn_down"
in_background_fake="start stop"
start_inactive=YES
fi
@ -59,7 +59,7 @@ start_pre()
sysctl -a | grep -q '\.tap\.' || kldload if_tap
fi
fi
# If the config file does not specify the cd option, we do
if ! grep -q "^[ \t]*cd[ \t].*" "$openvpn_config"; then
command_args="$command_args --cd $openvpn_dir"

View File

@ -31,5 +31,5 @@ start_pre()
eend $? || return 1
fi
$command -t
$command -t
}

View File

@ -43,7 +43,7 @@ find_wireless()
done
;;
esac
return 1
}

View File

@ -4,7 +4,7 @@
extra_commands="save"
description="Sets the local clock to UTC or Local Time."
description="Sets the local clock to UTC or Local Time."
description_save="Saves the current time in the BIOS."
: ${clock:=${CLOCK:-UTC}}
@ -26,7 +26,7 @@ depend()
}
start()
{
{
ebegin "Starting the System Clock Adjuster [${utc}]"
if [ "$clock" != "UTC" ]; then
echo >/etc/wall_cmos_clock

View File

@ -88,7 +88,7 @@ start()
eend 1 "failed to create needed directory $x"
return 1
fi
fi
fi
done
if dir_writeable /var/run; then
@ -137,7 +137,7 @@ start()
# Make sure our X11 stuff have the correct permissions
# Omit the chown as bootmisc is run before network is up
# and users may be using lame LDAP auth #139411
rm -rf /tmp/.ICE-unix /tmp/.X11-unix
rm -rf /tmp/.ICE-unix /tmp/.X11-unix
mkdir -p /tmp/.ICE-unix /tmp/.X11-unix
chmod 1777 /tmp/.ICE-unix /tmp/.X11-unix
if [ -x /sbin/restorecon ]; then

View File

@ -68,7 +68,7 @@ reset()
start()
{
if [ -r "$hostid_file" ]; then
_set $(cat "$hostid_file")
_set $(cat "$hostid_file")
else
reset
fi

View File

@ -4,7 +4,7 @@
extra_commands="save show"
description="Sets the local clock to UTC or Local Time."
description="Sets the local clock to UTC or Local Time."
description_save="Saves the current time in the BIOS."
description_show="Displays the current time in the BIOS."
@ -87,7 +87,7 @@ start()
_hwclock --adjust $utc_cmd
retval=$(($retval + $?))
fi
# If setting UTC, don't bother to run hwclock when first booting
# as that's the default
if [ "$PREVLEVEL" != N -o \
@ -97,7 +97,7 @@ start()
_hwclock --hctosys $utc_cmd $clock_args
retval=$(($retval + $?))
fi
eend $retval "Failed to set the system clock"
return 0
@ -126,7 +126,7 @@ stop()
_hwclock --systohc $utc_cmd $clock_args
retval=$?
eend $retval "Failed to sync clocks"
eend $retval "Failed to sync clocks"
}
save()

View File

@ -40,11 +40,11 @@ init() {
ipfw add deny all from any to 127.0.0.0/8
ipfw add deny ip from 127.0.0.0/8 to any
if have_ip6; then
if have_ip6; then
ipfw add pass ip6 from any to any via lo0
ipfw add deny ip6 from any to ::1
ipfw add deny ip6 from ::1 to any
ipfw add pass ip6 from :: to ff02::/16 proto ipv6-icmp
ipfw add pass ip6 from fe80::/10 to fe80::/10 proto ipv6-icmp
ipfw add pass ip6 from fe80::/10 to ff02::/16 proto ipv6-icmp
@ -78,7 +78,7 @@ start() {
ipfw add pass udp from 0.0.0.0 68 to 255.255.255.255 67 out
ipfw add pass udp from any 67 to me 68 in
ipfw add pass udp from any 67 to 255.255.255.255 68 in
# Some servers will ping the IP while trying to decide if it's
# Some servers will ping the IP while trying to decide if it's
# still in use.
ipfw add pass icmp from any to any icmptype 8
@ -88,11 +88,11 @@ start() {
if have_ip6; then
# Allow ICMPv6 destination unreach
ipfw add pass ip6 from any to any icmp6types 1 proto ipv6-icmp
# Allow NS/NA/toobig (don't filter it out)
ipfw add pass ip6 from any to any icmp6types 2,135,136 proto ipv6-icmp
fi
# Add permits for this workstations published services below
# Only IPs and nets in firewall_allowservices is allowed in.
for i in $ipfw_ip_in; do
@ -107,7 +107,7 @@ start() {
for i in $ipfw_ip_trust; do
ipfw add pass ip from $i to me
done
ipfw add 65000 count ip from any to any
# Drop packets to ports where we don't want logging
@ -117,7 +117,7 @@ start() {
# Broadcasts and muticasts
ipfw add deny ip from any to 255.255.255.255
ipfw add deny ip from any to 224.0.0.0/24
ipfw add deny ip from any to 224.0.0.0/24
# Noise from routers
ipfw add deny udp from any to any 520 in

View File

@ -17,7 +17,7 @@ start()
: ${unicode:=$UNICODE}
: ${keymap:=$KEYMAP}
: ${extended_keymaps:=$EXTENDED_KEYMAPS}
: ${windowkeys:=$SET_WINDOWSKEYS}
: ${windowkeys:=$SET_WINDOWSKEYS}
: ${fix_euro:=$FIX_EURO}
: ${dumpkeys_charset:=${DUMPKEYS_CHARSET}}

View File

@ -15,7 +15,7 @@ start()
killall5 -15
sleep 1
eend 0
ebegin "Killing remaining processes"
ebegin "Killing remaining processes"
killall5 -9
sleep 1
eend 0

View File

@ -21,13 +21,13 @@ depend()
start()
{
ebegin "Starting $name"
ebegin "Starting $name"
if [ -z "$moused_device" ]; then
local dev=
for dev in /dev/psm[0-9]* /dev/ums[0-9]*; do
[ -c "$dev" ] || continue
[ -e /var/run/moused-"${dev##*/}".pid ] && continue
[ -e /var/run/moused-"${dev##*/}".pid ] && continue
moused_device=$dev
eindent
einfo "Using mouse on $moused_device"
@ -37,7 +37,7 @@ start()
fi
if [ -z "$moused_device" ]; then
eend 1 "No mouse device found"
eend 1 "No mouse device found"
return 1
fi
@ -49,7 +49,7 @@ start()
--pidfile "$pidfile" \
-- $args -p "$moused_device" -I "$pidfile"
local retval=$?
if [ $retval = 0 ]; then
local ttyv=
for ttyv in /dev/ttyv*; do
@ -57,6 +57,6 @@ start()
: $((retval+= $?))
done
fi
eend $retval "Failed to start moused"
}

View File

@ -180,7 +180,7 @@ _gen_module_list()
${update} || return 0
fi
einfo "Caching network module dependencies"
einfo "Caching network module dependencies"
# Run in a subshell to protect the main script
(
after() {
@ -215,7 +215,7 @@ _gen_module_list()
for MODULE in "${MODULESDIR}"/*.sh; do
sh -n "${MODULE}" || continue
. "${MODULE}" || continue
. "${MODULE}" || continue
MODULE=${MODULE#${MODULESDIR}/}
MODULE=${MODULE%.sh}
eval ${MODULE}_depend
@ -343,7 +343,7 @@ _load_modules()
# Wrap our provides
local f=
for f in pre_start start post_start; do
for f in pre_start start post_start; do
eval "${provides}_${f}() { [ "$(command -v "${mod}_${f}")" = "${mod}_${f}" ] || return 0; ${mod}_${f} \"\$@\"; }"
done
@ -357,7 +357,7 @@ _load_modules()
*" ${mod} "*)
eval x=\$module_${mod}_provides
[ -z "${x}" ] && continue
for f in pre_start start post_start; do
for f in pre_start start post_start; do
eval "${x}_${f}() { [ "$(command -v "${mod}_${f}")" = "${mod}_${f}" ] || return 0; ${mod}_${f} \"\$@\"; }"
done
eval module_${x}_providedby="${mod}"
@ -379,7 +379,7 @@ _load_modules()
MODULES="${MODULES}${MODULES:+ }${mod}"
done
else
for mod in ${LIST}; do
for mod in ${LIST}; do
MODULES="${mod}${MODULES:+ }${MODULES}"
done
fi
@ -395,7 +395,7 @@ _load_config()
config_index=0
local IFS="$__IFS"
set -- ${config}
# We should support a space separated array for cidr configs
if [ $# = 1 ]; then
unset IFS
@ -415,7 +415,7 @@ _load_config()
config_0="127.0.0.1/8"
config_index=1
fi
else
else
if [ -z "$1" ]; then
ewarn "No configuration specified; defaulting to DHCP"
config_0="dhcp"
@ -500,7 +500,7 @@ start()
fi
_up 2>/dev/null
for module in ${MODULES}; do
if [ "$(command -v "${module}_pre_start")" = "${module}_pre_start" ]; then
${module}_pre_start || exit $?
@ -527,7 +527,7 @@ start()
_load_config
config_index=0
eval our_metric=\$metric_${IFVAR}
eval our_metric=\$metric_${IFVAR}
if [ -n "${our_metric}" ]; then
metric=${our_metric}
elif [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then
@ -536,7 +536,7 @@ start()
while true; do
eval config=\$config_${config_index}
[ -z "${config}" ] && break
[ -z "${config}" ] && break
set -- ${config}
ebegin "$1"
@ -638,7 +638,7 @@ ${routes}"
if [ "$(command -v postup)" = "postup" ]; then
ebegin "Running postup"
eindent
postup
postup
eoutdent
fi

View File

@ -39,7 +39,7 @@ depend()
}
start()
{
{
local myneed= myuse= pmap="portmap" nfsmounts=
[ -x @SYSCONFDIR@/init.d/rpcbind ] && pmap="rpcbind"

View File

@ -222,7 +222,7 @@ start()
einfo "Starting network"
routeflush
if [ "$RC_UNAME" = "Linux" ]; then
ifconfig lo 127.0.0.1 netmask 255.0.0.0 || cr=1
ifconfig lo 127.0.0.1 netmask 255.0.0.0 || cr=1
route add -net 127.0.0.0 netmask 255.0.0.0 \
gw 127.0.0.1 reject 2>/dev/null
else
@ -287,7 +287,7 @@ start()
[ $r != 0 ]
veend $?
fi
if [ -n "$defaultroute" ]; then
ebegin "Setting default route $defaultroute"
route add default $defaultroute

View File

@ -44,7 +44,7 @@ reload()
{
ebegin "Reloading $name rules."
pfctl -q -n -f "$pf_conf" && \
{
{
# Flush everything but existing state entries that way when
# rules are read in, it doesn't break established connections.
pfctl -q -Fnat -Fqueue -Frules -FSources -Finfo -FTables -Fosfp

View File

@ -13,11 +13,11 @@ start()
ebegin "Activating block swap devices"
swapctl -A -t blk >/dev/null
eend 0 # If swapon has nothing todo it errors, so always return 0
}
}
stop()
{
ebegin "Deactivating block swap devices"
swapctl -U -t blk >/dev/null
eend 0
eend 0
}

View File

@ -16,7 +16,7 @@ start()
*) swapon -a >/dev/null;;
esac
eend 0 # If swapon has nothing todo it errors, so always return 0
}
}
stop()
{
@ -31,5 +31,5 @@ stop()
NetBSD|OpenBSD) swapctl -U -t noblk >/dev/null;;
*) swapoff -a >/dev/null;;
esac
eend 0
eend 0
}

View File

@ -15,13 +15,13 @@ start() {
done
eend $?
fi
if [ -n "$keymap" ]; then
ebegin "Setting keymap to $keymap"
kbdcontrol -l $keymap </dev/console
eend $?
fi
if [ -n "$keyrate" ]; then
ebegin "Setting keyrate to $keyrate"
kbdcontrol -r $keyrate </dev/console
@ -40,7 +40,7 @@ start() {
done
eoutdent
fi
if [ -n "$cursor" ]; then
ebegin "Setting cursor"
vidcontrol -c $cursor

View File

@ -2,7 +2,7 @@
# Copyright (c) 2008 Roy Marples <roy@marples.name>
# All rights reserved. Released under the 2-clause BSD license.
depend()
depend()
{
after fsck
keyword -prefix
@ -13,7 +13,7 @@ start()
ebegin "Setting tty flags"
ttyflags -a
eend $? || return $?
if [ -c /dev/ttyp0 ]; then
chmod 666 /dev/tty[p-uw-zP-T][0-9a-zA-Z]
fi

View File

@ -27,10 +27,10 @@ start()
font)
cmd=$wsfld
[ "$arg2" != "-" ] && cmd="$cmd -w $arg2"
[ "$arg3" != "-" ] && cmd="$cmd -h $arg3"
[ "$arg3" != "-" ] && cmd="$cmd -h $arg3"
[ "$arg4" != "-" ] && cmd="$cmd -e $arg4"
cmd="$cmd -N $arg1 $arg5"
eval "$cmd"
eval "$cmd"
;;
screen)

View File

@ -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

View File

@ -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

View File

@ -115,7 +115,7 @@ bonding_pre_start()
bonding_stop()
{
_is_bond || return 0
_is_bond || return 0
local slaves= s=
slaves=$( \

View File

@ -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 $?

View File

@ -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
}

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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" \

View File

@ -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))

View File

@ -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;;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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}"

View File

@ -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}

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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

View File

@ -34,7 +34,7 @@ mount_svcdir()
[ $? -eq 0 ] && return 0
fi
fi
if grep -Eq "[[:space:]]+ramfs$" /proc/filesystems; then
fs="ramfs"
# ramfs has no special options

View File

@ -111,7 +111,7 @@ start()
[ -n "$command" ] || return 0
local _background=
ebegin "Starting ${name:-$RC_SVCNAME}"
if yesno "${command_background}"; then
if yesno "${command_background}"; then
_background="--background --pidfile"
fi
if yesno "$start_inactive"; then
@ -252,7 +252,7 @@ while [ -n "$1" ]; do
eerror "$RC_SVCNAME: function \`$1' defined but does not exist"
exit 1
fi
fi
fi
fi
done
eerror "$RC_SVCNAME: unknown function \`$1'"

View File

@ -152,7 +152,7 @@ do_e(int argc, char **argv)
ts.tv_nsec = WAIT_INTERVAL;
for (i = 0; i < argc; i++) {
ebeginv("Waiting for %s", argv[i]);
for (;;){
for (;;) {
if (exists(argv[i]))
break;
if (nanosleep(&ts, NULL) == -1)