mirror of
https://github.com/pygos/init-scripts.git
synced 2024-11-22 12:19:46 +01:00
Remove possible bashisms
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
021fa43244
commit
b6c97e117c
4 changed files with 6 additions and 6 deletions
|
@ -5,7 +5,7 @@ CFGPATH="@ETCPATH@/netcfg"
|
||||||
|
|
||||||
# configure interfaces
|
# configure interfaces
|
||||||
for IFPATH in /sys/class/net/*; do
|
for IFPATH in /sys/class/net/*; do
|
||||||
[ "$IFPATH" == "/sys/class/net/lo" ] && continue
|
[ "$IFPATH" = "/sys/class/net/lo" ] && continue
|
||||||
|
|
||||||
IF=`basename $IFPATH`
|
IF=`basename $IFPATH`
|
||||||
CFGFILE="$CFGPATH/$IF"
|
CFGFILE="$CFGPATH/$IF"
|
||||||
|
@ -63,7 +63,7 @@ fi
|
||||||
|
|
||||||
# activate interfaces
|
# activate interfaces
|
||||||
for IFPATH in /sys/class/net/*; do
|
for IFPATH in /sys/class/net/*; do
|
||||||
[ "$IFPATH" == "/sys/class/net/lo" ] && continue
|
[ "$IFPATH" = "/sys/class/net/lo" ] && continue
|
||||||
|
|
||||||
IF=`basename $IFPATH`
|
IF=`basename $IFPATH`
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
for IFPATH in /sys/class/net/*; do
|
for IFPATH in /sys/class/net/*; do
|
||||||
[ "$IFPATH" == "/sys/class/net/lo" ] && continue
|
[ "$IFPATH" = "/sys/class/net/lo" ] && continue
|
||||||
|
|
||||||
IF=`basename $IFPATH`
|
IF=`basename $IFPATH`
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ TMPPATH="/tmp/ifrename"
|
||||||
mkdir -p "$TMPPATH"
|
mkdir -p "$TMPPATH"
|
||||||
|
|
||||||
for IFPATH in /sys/class/net/*; do
|
for IFPATH in /sys/class/net/*; do
|
||||||
[ "$IFPATH" == "/sys/class/net/lo" ] && continue
|
[ "$IFPATH" = "/sys/class/net/lo" ] && continue
|
||||||
|
|
||||||
IF=`basename $IFPATH`
|
IF=`basename $IFPATH`
|
||||||
MAC=`cat $IFPATH/address`
|
MAC=`cat $IFPATH/address`
|
||||||
|
|
|
@ -15,9 +15,9 @@ resolve() {
|
||||||
|
|
||||||
if [ -x "$(command -v drill)" ]; then
|
if [ -x "$(command -v drill)" ]; then
|
||||||
if [ -z "$server" ]; then
|
if [ -z "$server" ]; then
|
||||||
drill "$domain" | grep "^${domain}." | cut -d$'\t' -f5
|
drill "$domain" | grep "^$domain." | cut -d$'\t' -f5
|
||||||
else
|
else
|
||||||
drill "@$server" "$domain" | grep "^${domain}." |\
|
drill "@$server" "$domain" | grep "^$domain." |\
|
||||||
cut -d$'\t' -f5
|
cut -d$'\t' -f5
|
||||||
fi
|
fi
|
||||||
return $?
|
return $?
|
||||||
|
|
Loading…
Reference in a new issue