summaryrefslogtreecommitdiff
path: root/net.Linux/arping.sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-28 15:45:03 +0000
committerRoy Marples <roy@marples.name>2007-11-28 15:45:03 +0000
commitac9279cc0d5a00bc17908b2914941186020cd3ce (patch)
tree850a4fe19917113e75bfd2e79d00b58208468503 /net.Linux/arping.sh
parent444f23e2d158389b22d40537fc9b027d9f575229 (diff)
downloadopenrc-ac9279cc0d5a00bc17908b2914941186020cd3ce.tar.gz
openrc-ac9279cc0d5a00bc17908b2914941186020cd3ce.tar.bz2
openrc-ac9279cc0d5a00bc17908b2914941186020cd3ce.tar.xz
Massive whitespace cleanup
Diffstat (limited to 'net.Linux/arping.sh')
-rw-r--r--net.Linux/arping.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/net.Linux/arping.sh b/net.Linux/arping.sh
index 977b191..d173465 100644
--- a/net.Linux/arping.sh
+++ b/net.Linux/arping.sh
@@ -33,9 +33,9 @@ arping_address() {
# We only handle IPv4 addresses
case "${ip}" in
- 0.0.0.0|0) return 1 ;;
- *.*.*.*) ;;
- *) return 1 ;;
+ 0.0.0.0|0) return 1;;
+ *.*.*.*);;
+ *) return 1;;
esac
# We need to bring the interface up to test
@@ -64,8 +64,8 @@ arping_address() {
fi
[ -z "${foundmac}" ] && return 1
- if [ -n "${mac}" ] ; then
- if [ "${mac}" != "${foundmac}" ] ; then
+ if [ -n "${mac}" ]; then
+ if [ "${mac}" != "${foundmac}" ]; then
vewarn "Found ${ip} but MAC ${foundmac} does not match"
return 1
fi
@@ -86,7 +86,7 @@ arping_start() {
einfo "Pinging gateways on ${IFACE} for configuration"
eval gateways=\$gateways_${IFVAR}
- if [ -z "${gateways}" ] ; then
+ if [ -z "${gateways}" ]; then
eerror "No gateways have been defined (gateways_${IFVAR}=\"...\")"
return 1
fi
@@ -99,18 +99,18 @@ arping_start() {
local ip=$1 mac=$2 spoof=$3 extra=
unset IFS
- if [ -n "${mac}" ] ; then
+ if [ -n "${mac}" ]; then
mac="$(echo "${mac}" | tr '[:lower:]' '[:upper:]')"
extra="(MAC ${mac})"
fi
vebegin "${ip} ${extra}"
- if arping_address "${ip}" "${mac}" "${spoof}" ; then
+ if arping_address "${ip}" "${mac}" "${spoof}"; then
local IFS=.
- for i in ${ip} ; do
- if [ "${#i}" = "2" ] ; then
+ for i in ${ip}; do
+ if [ "${#i}" = "2" ]; then
conf="${conf}0${i}"
- elif [ "${#i}" = "1" ] ; then
+ elif [ "${#i}" = "1" ]; then
conf="${conf}00${i}"
else
conf="${conf}${i}"