From faa2df11597cf496205d3d629e3b3147b569afc8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 17 Jan 2011 04:49:07 -0500 Subject: [PATCH] more whitespace cleanup Signed-off-by: Mike Frysinger --- doc/net.example.BSD.in | 10 +++++----- doc/net.example.Linux.in | 28 ++++++++++++++-------------- etc/rc.conf.in | 2 +- etc/rc.in | 2 +- etc/rc.shutdown.in | 2 +- init.d.misc/dnsmasq.in | 2 +- init.d.misc/openvpn.in | 4 ++-- init.d.misc/sshd.in | 2 +- init.d.misc/wpa_supplicant.in | 2 +- init.d/adjkerntz.in | 4 ++-- init.d/bootmisc.in | 4 ++-- init.d/hostid.in | 2 +- init.d/hwclock.in | 8 ++++---- init.d/ipfw.in | 14 +++++++------- init.d/keymaps.in | 2 +- init.d/killprocs.in | 2 +- init.d/moused.in | 10 +++++----- init.d/net.lo.in | 22 +++++++++++----------- init.d/netmount.in | 2 +- init.d/network.in | 4 ++-- init.d/pf.in | 2 +- init.d/swap-blk.in | 4 ++-- init.d/swap.in | 4 ++-- init.d/syscons.in | 6 +++--- init.d/ttys.in | 4 ++-- init.d/wscons.in | 4 ++-- net/apipa.sh | 2 +- net/arping.sh | 8 ++++---- net/bonding.sh | 2 +- net/br2684ctl.sh | 6 +++--- net/bridge.sh | 6 +++--- net/ccwgroup.sh | 6 +++--- net/clip.sh | 2 +- net/ifconfig.sh.Linux.in | 6 +++--- net/ifplugd.sh | 4 ++-- net/ifwatchd.sh | 2 +- net/ip6to4.sh | 4 ++-- net/iproute2.sh | 6 +++--- net/iwconfig.sh.BSD.in | 6 +++--- net/iwconfig.sh.Linux.in | 24 ++++++++++++------------ net/macchanger.sh | 2 +- net/netplugd.sh | 4 ++-- net/pppd.sh | 8 ++++---- net/pump.sh | 4 ++-- net/system.sh | 8 ++++---- net/vlan.sh | 4 ++-- net/wpa_supplicant.sh | 4 ++-- sh/init.sh.Linux.in | 2 +- sh/runscript.sh.in | 4 ++-- src/rc/rc-applets.c | 2 +- 50 files changed, 139 insertions(+), 139 deletions(-) diff --git a/doc/net.example.BSD.in b/doc/net.example.BSD.in index 977011ea..287c644a 100644 --- a/doc/net.example.BSD.in +++ b/doc/net.example.BSD.in @@ -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 diff --git a/doc/net.example.Linux.in b/doc/net.example.Linux.in index 42e5477c..2d1a7dc5 100644 --- a/doc/net.example.Linux.in +++ b/doc/net.example.Linux.in @@ -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 diff --git a/etc/rc.conf.in b/etc/rc.conf.in index 6aa36135..3c1210be 100644 --- a/etc/rc.conf.in +++ b/etc/rc.conf.in @@ -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 diff --git a/etc/rc.in b/etc/rc.in index edd7a5d8..d267bec0 100644 --- a/etc/rc.in +++ b/etc/rc.in @@ -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 diff --git a/etc/rc.shutdown.in b/etc/rc.shutdown.in index e0231c73..115f212d 100644 --- a/etc/rc.shutdown.in +++ b/etc/rc.shutdown.in @@ -2,7 +2,7 @@ # Copyright (c) 2007-2008 Roy Marples # 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 diff --git a/init.d.misc/dnsmasq.in b/init.d.misc/dnsmasq.in index de4bade6..958a87e1 100644 --- a/init.d.misc/dnsmasq.in +++ b/init.d.misc/dnsmasq.in @@ -10,7 +10,7 @@ required_files=/etc/dnsmasq.conf extra_started_commands="reload" depend() -{ +{ provide dns need localmount net after bootmisc diff --git a/init.d.misc/openvpn.in b/init.d.misc/openvpn.in index eb1360bf..a53a3edd 100644 --- a/init.d.misc/openvpn.in +++ b/init.d.misc/openvpn.in @@ -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" diff --git a/init.d.misc/sshd.in b/init.d.misc/sshd.in index 3d02cab8..403f43b0 100644 --- a/init.d.misc/sshd.in +++ b/init.d.misc/sshd.in @@ -31,5 +31,5 @@ start_pre() eend $? || return 1 fi - $command -t + $command -t } diff --git a/init.d.misc/wpa_supplicant.in b/init.d.misc/wpa_supplicant.in index f1d65c5d..24269056 100644 --- a/init.d.misc/wpa_supplicant.in +++ b/init.d.misc/wpa_supplicant.in @@ -43,7 +43,7 @@ find_wireless() done ;; esac - + return 1 } diff --git a/init.d/adjkerntz.in b/init.d/adjkerntz.in index ee09ac8d..807d4117 100644 --- a/init.d/adjkerntz.in +++ b/init.d/adjkerntz.in @@ -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 diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in index 1298740f..320e7e82 100644 --- a/init.d/bootmisc.in +++ b/init.d/bootmisc.in @@ -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 diff --git a/init.d/hostid.in b/init.d/hostid.in index 26ea9d6a..a12e34ad 100644 --- a/init.d/hostid.in +++ b/init.d/hostid.in @@ -68,7 +68,7 @@ reset() start() { if [ -r "$hostid_file" ]; then - _set $(cat "$hostid_file") + _set $(cat "$hostid_file") else reset fi diff --git a/init.d/hwclock.in b/init.d/hwclock.in index e99900f6..7ab630cc 100644 --- a/init.d/hwclock.in +++ b/init.d/hwclock.in @@ -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() diff --git a/init.d/ipfw.in b/init.d/ipfw.in index 9d6faa4f..ea6e22a7 100644 --- a/init.d/ipfw.in +++ b/init.d/ipfw.in @@ -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 diff --git a/init.d/keymaps.in b/init.d/keymaps.in index f37fbb5c..776f3bbf 100644 --- a/init.d/keymaps.in +++ b/init.d/keymaps.in @@ -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}} diff --git a/init.d/killprocs.in b/init.d/killprocs.in index d12f0f64..7132e9ea 100644 --- a/init.d/killprocs.in +++ b/init.d/killprocs.in @@ -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 diff --git a/init.d/moused.in b/init.d/moused.in index a3622284..33b8d02b 100644 --- a/init.d/moused.in +++ b/init.d/moused.in @@ -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" } diff --git a/init.d/net.lo.in b/init.d/net.lo.in index 30d01869..b194a236 100644 --- a/init.d/net.lo.in +++ b/init.d/net.lo.in @@ -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 diff --git a/init.d/netmount.in b/init.d/netmount.in index 88ce16f0..3bdc63b1 100644 --- a/init.d/netmount.in +++ b/init.d/netmount.in @@ -39,7 +39,7 @@ depend() } start() -{ +{ local myneed= myuse= pmap="portmap" nfsmounts= [ -x @SYSCONFDIR@/init.d/rpcbind ] && pmap="rpcbind" diff --git a/init.d/network.in b/init.d/network.in index 01e88ce8..a5633328 100644 --- a/init.d/network.in +++ b/init.d/network.in @@ -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 diff --git a/init.d/pf.in b/init.d/pf.in index 15c9fc5d..a36df264 100644 --- a/init.d/pf.in +++ b/init.d/pf.in @@ -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 diff --git a/init.d/swap-blk.in b/init.d/swap-blk.in index 3c1c52cf..f7d43673 100644 --- a/init.d/swap-blk.in +++ b/init.d/swap-blk.in @@ -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 } diff --git a/init.d/swap.in b/init.d/swap.in index d99b9b83..a1a931fe 100644 --- a/init.d/swap.in +++ b/init.d/swap.in @@ -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 } diff --git a/init.d/syscons.in b/init.d/syscons.in index cb584b36..ba22bf51 100644 --- a/init.d/syscons.in +++ b/init.d/syscons.in @@ -15,13 +15,13 @@ start() { done eend $? fi - + if [ -n "$keymap" ]; then ebegin "Setting keymap to $keymap" kbdcontrol -l $keymap # 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 diff --git a/init.d/wscons.in b/init.d/wscons.in index 3b18a24b..916e27ba 100644 --- a/init.d/wscons.in +++ b/init.d/wscons.in @@ -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) 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 diff --git a/sh/init.sh.Linux.in b/sh/init.sh.Linux.in index 0e581c10..ad48585d 100644 --- a/sh/init.sh.Linux.in +++ b/sh/init.sh.Linux.in @@ -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 diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in index 947c2f73..229d1ee7 100644 --- a/sh/runscript.sh.in +++ b/sh/runscript.sh.in @@ -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'" diff --git a/src/rc/rc-applets.c b/src/rc/rc-applets.c index ba2815d7..83811137 100644 --- a/src/rc/rc-applets.c +++ b/src/rc/rc-applets.c @@ -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)