Browse Source

Remove possible bashisms

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
master
David Oberhollenzer 3 years ago
parent
commit
b6c97e117c
  1. 4
      scripts/ifcfg.sh.in
  2. 2
      scripts/ifdown.sh
  3. 2
      scripts/ifrename.sh.in
  4. 4
      scripts/setntpdate.sh

4
scripts/ifcfg.sh.in

@ -5,7 +5,7 @@ CFGPATH="@ETCPATH@/netcfg"
# configure interfaces
for IFPATH in /sys/class/net/*; do
[ "$IFPATH" == "/sys/class/net/lo" ] && continue
[ "$IFPATH" = "/sys/class/net/lo" ] && continue
IF=`basename $IFPATH`
CFGFILE="$CFGPATH/$IF"
@ -63,7 +63,7 @@ fi
# activate interfaces
for IFPATH in /sys/class/net/*; do
[ "$IFPATH" == "/sys/class/net/lo" ] && continue
[ "$IFPATH" = "/sys/class/net/lo" ] && continue
IF=`basename $IFPATH`

2
scripts/ifdown.sh

@ -1,6 +1,6 @@
#!/bin/sh
for IFPATH in /sys/class/net/*; do
[ "$IFPATH" == "/sys/class/net/lo" ] && continue
[ "$IFPATH" = "/sys/class/net/lo" ] && continue
IF=`basename $IFPATH`

2
scripts/ifrename.sh.in

@ -7,7 +7,7 @@ TMPPATH="/tmp/ifrename"
mkdir -p "$TMPPATH"
for IFPATH in /sys/class/net/*; do
[ "$IFPATH" == "/sys/class/net/lo" ] && continue
[ "$IFPATH" = "/sys/class/net/lo" ] && continue
IF=`basename $IFPATH`
MAC=`cat $IFPATH/address`

4
scripts/setntpdate.sh

@ -15,9 +15,9 @@ resolve() {
if [ -x "$(command -v drill)" ]; then
if [ -z "$server" ]; then
drill "$domain" | grep "^${domain}." | cut -d$'\t' -f5
drill "$domain" | grep "^$domain." | cut -d$'\t' -f5
else
drill "@$server" "$domain" | grep "^${domain}." |\
drill "@$server" "$domain" | grep "^$domain." |\
cut -d$'\t' -f5
fi
return $?

Loading…
Cancel
Save