aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ppp/ip-down.ipv6to48
-rw-r--r--ppp/ip-up.ipv6to416
-rw-r--r--rc.d/init.d/functions2
-rwxr-xr-xrc.d/init.d/halt2
-rw-r--r--rc.d/init.d/netconsole2
-rwxr-xr-xrc.d/init.d/netfs16
-rwxr-xr-xrc.d/init.d/network12
-rwxr-xr-xrc.d/rc2
-rwxr-xr-xrc.d/rc.sysinit20
-rwxr-xr-xservice4
-rwxr-xr-xsetsysfont2
-rwxr-xr-xsysconfig/network-scripts/ifdown-bnep4
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth16
-rwxr-xr-xsysconfig/network-scripts/ifdown-ippp2
-rwxr-xr-xsysconfig/network-scripts/ifdown-ipsec6
-rwxr-xr-xsysconfig/network-scripts/ifdown-ipv610
-rwxr-xr-xsysconfig/network-scripts/ifdown-ppp4
-rwxr-xr-xsysconfig/network-scripts/ifdown-sit2
-rwxr-xr-xsysconfig/network-scripts/ifup-aliases6
-rwxr-xr-xsysconfig/network-scripts/ifup-eth10
-rwxr-xr-xsysconfig/network-scripts/ifup-ippp6
-rwxr-xr-xsysconfig/network-scripts/ifup-ipsec8
-rwxr-xr-xsysconfig/network-scripts/ifup-ipv618
-rwxr-xr-xsysconfig/network-scripts/ifup-post4
-rwxr-xr-xsysconfig/network-scripts/ifup-ppp2
-rwxr-xr-xsysconfig/network-scripts/ifup-routes2
-rwxr-xr-xsysconfig/network-scripts/ifup-sit2
-rwxr-xr-xsysconfig/network-scripts/ifup-wireless2
-rw-r--r--sysconfig/network-scripts/network-functions38
-rw-r--r--sysconfig/network-scripts/network-functions-ipv656
30 files changed, 142 insertions, 142 deletions
diff --git a/ppp/ip-down.ipv6to4 b/ppp/ip-down.ipv6to4
index 93e0d91d..d6e50b54 100644
--- a/ppp/ip-down.ipv6to4
+++ b/ppp/ip-down.ipv6to4
@@ -48,7 +48,7 @@ CONFIG=$1
source_config
# IPv6 don't need aliases anymore, config is skipped
-REALDEVICE=`echo ${DEVICE} | sed 's/:.*//g'`
+REALDEVICE=$(echo ${DEVICE} | sed 's/:.*//g')
[ "$DEVICE" != "$REALDEVICE" ] && exit 0
if [ ! -f /etc/sysconfig/network-scripts/network-functions-ipv6 ]; then
@@ -75,14 +75,14 @@ if [ $? = 0 -o $? = 11 ]; then
valid6to4config="yes"
# Get IPv4 address from interface
- ipv4addr="`ipv6_get_ipv4addr_of_device $DEVICE`"
+ ipv4addr="$(ipv6_get_ipv4addr_of_device $DEVICE)"
if [ -z "$ipv4addr" ]; then
# Has no IPv4 address
valid6to4config="no"
fi
# Get local IPv4 address of dedicated tunnel
- ipv4addr6to4local="`ipv6_get_ipv4addr_of_tunnel tun6to4 local`"
+ ipv4addr6to4local="$(ipv6_get_ipv4addr_of_tunnel tun6to4 local)"
# IPv6to4 not enabled on this interface?
if [ $IPV6TO4INIT != "yes" ]; then
@@ -104,7 +104,7 @@ if [ "$valid6to4config" = "yes" ]; then
if [ -n "$IPV6TO4_ROUTING" ]; then
# Delete routes to local networks
for devsuf in $IPV6TO4_ROUTING; do
- dev="`echo $devsuf | awk -F- '{ print $1 }'`"
+ dev="$(echo $devsuf | awk -F- '{ print $1 }')"
ipv6_cleanup_6to4_device $dev
done
fi
diff --git a/ppp/ip-up.ipv6to4 b/ppp/ip-up.ipv6to4
index e06cc246..8e6b094e 100644
--- a/ppp/ip-up.ipv6to4
+++ b/ppp/ip-up.ipv6to4
@@ -54,7 +54,7 @@ CONFIG=$1
source_config
# IPv6 don't need aliases anymore, config is skipped
-REALDEVICE=`echo ${DEVICE} | sed 's/:.*//g'`
+REALDEVICE=$(echo ${DEVICE} | sed 's/:.*//g')
[ "$DEVICE" != "$REALDEVICE" ] && exit 0
if [ ! -f /etc/sysconfig/network-scripts/network-functions-ipv6 ]; then
@@ -75,7 +75,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
ipv4addr="$IPV6TO4_IPV4ADDR"
else
# Get IPv4 address from interface (precedence 2)
- ipv4addr="`ipv6_get_ipv4addr_of_device $DEVICE`"
+ ipv4addr="$(ipv6_get_ipv4addr_of_device $DEVICE)"
if [ -z "$ipv4addr" ]; then
# Take configured IPv4 address of interface from config file (precedence 3)
ipv4addr="$IPADDR"
@@ -96,7 +96,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
fi
# Check/generate relay address
- ipv6to4_relay="`ipv6_create_6to4_relay_address $IPV6TO4_RELAY`"
+ ipv6to4_relay="$(ipv6_create_6to4_relay_address $IPV6TO4_RELAY)"
if [ $? -ne 0 ]; then
valid6to4config="no"
fi
@@ -104,7 +104,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
if [ "$valid6to4config" = "yes" ]; then
# Delete routes to local networks
for devsuf in $IPV6TO4_ROUTING; do
- dev="`echo $devsuf | awk -F- '{ print $1 }'`"
+ dev="$(echo $devsuf | awk -F- '{ print $1 }')"
ipv6_cleanup_6to4_device $dev
done
@@ -112,7 +112,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
ipv6_cleanup_6to4_tunnels tun6to4
# Get MTU of master device
- ipv4mtu="`ipv6_exec_ip link show dev $DEVICE | grep -w "mtu" | awk '{ print $5 }'`"
+ ipv4mtu="$(ipv6_exec_ip link show dev $DEVICE | grep -w "mtu" | awk '{ print $5 }')"
if [ -n "$ipv4mtu" ]; then
# IPv6 tunnel MTU is IPv4 MTU minus 20 for IPv4 header
tunnelmtu=$[ $ipv4mtu - 20 ]
@@ -174,12 +174,12 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
if [ -n "$IPV6TO4_ROUTING" ]; then
# Generate 6to4 address
- ipv6to4prefix="`ipv6_create_6to4_prefix $ipv4addr`"
+ ipv6to4prefix="$(ipv6_create_6to4_prefix $ipv4addr)"
if [ -n "$ipv6to4prefix" ]; then
# Add IPv6 address to interface (required interface route will be set automatically)
for devsuf in $IPV6TO4_ROUTING; do
- dev="`echo $devsuf | awk -F- '{ print $1 }'`"
- suf="`echo $devsuf | awk -F- '{ print $2 }'`"
+ dev="$(echo $devsuf | awk -F- '{ print $1 }')"
+ suf="$(echo $devsuf | awk -F- '{ print $2 }')"
ipv6_add_addr_on_device ${dev} ${ipv6to4prefix}${suf}
done
else
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 9825019a..82590a16 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -16,7 +16,7 @@ export PATH
# Get a sane screen width
[ -z "${COLUMNS:-}" ] && COLUMNS=80
-[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="`/sbin/consoletype`"
+[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="$(/sbin/consoletype)"
if [ -f /etc/sysconfig/i18n -a -z "${NOLOCALE:-}" -a -z "${LANGSH_SOURCED:-}" ] ; then
. /etc/profile.d/lang.sh 2>/dev/null
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index aba3d3ea..97accb9e 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -93,7 +93,7 @@ tmpfs=$(awk '$2 ~ /^\/($|proc|dev)/ { next; }
[ -n "$tmpfs" ] && fstab-decode $UMOUNT $tmpfs 2>/dev/null
# Turn off swap, then unmount file systems.
-[ -f /proc/swaps ] && SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps`
+[ -f /proc/swaps ] && SWAPS=$(awk '! /^Filename/ { print $1 }' /proc/swaps)
if [ -n "$SWAPS" ]; then
action $"Turning off swap: " swapoff $SWAPS
for dst in $SWAPS; do
diff --git a/rc.d/init.d/netconsole b/rc.d/init.d/netconsole
index 5f6c3020..172a82b9 100644
--- a/rc.d/init.d/netconsole
+++ b/rc.d/init.d/netconsole
@@ -29,7 +29,7 @@ SYSLOGADDR=
SYSLOGPORT=514
SYSLOGMACADDR=
-kernel=`uname -r | cut -d. -f1-2`
+kernel=$(uname -r | cut -d. -f1-2)
usage ()
{
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs
index b0fbed59..302f2e61 100755
--- a/rc.d/init.d/netfs
+++ b/rc.d/init.d/netfs
@@ -19,15 +19,15 @@
. /etc/init.d/functions
. /etc/sysconfig/network
-NFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $3 != "nfsd" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
-CIFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "cifs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
-NCPFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "ncpfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
-NETDEVFSTAB=`LC_ALL=C awk '!/^#/ && $4 ~/_netdev/ && $4 !~ /noauto/ { print $1 }' /etc/fstab`
+NFSFSTAB=$(LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $3 != "nfsd" && $4 !~ /noauto/ { print $2 }' /etc/fstab)
+CIFSFSTAB=$(LC_ALL=C awk '!/^#/ && $3 == "cifs" && $4 !~ /noauto/ { print $2 }' /etc/fstab)
+NCPFSTAB=$(LC_ALL=C awk '!/^#/ && $3 == "ncpfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab)
+NETDEVFSTAB=$(LC_ALL=C awk '!/^#/ && $4 ~/_netdev/ && $4 !~ /noauto/ { print $1 }' /etc/fstab)
-NFSMTAB=`LC_ALL=C awk '$3 ~ /^nfs/ && $3 != "nfsd" && $2 != "/" { print $2 }' /proc/mounts`
-CIFSMTAB=`LC_ALL=C awk '$3 == "cifs" { print $2 }' /proc/mounts`
-NCPMTAB=`LC_ALL=C awk '$3 == "ncpfs" { print $2 }' /proc/mounts`
-NETDEVMTAB=`LC_ALL=C awk '$4 ~ /_netdev/ && $2 != "/" { print $2 }' /etc/mtab`
+NFSMTAB=$(LC_ALL=C awk '$3 ~ /^nfs/ && $3 != "nfsd" && $2 != "/" { print $2 }' /proc/mounts)
+CIFSMTAB=$(LC_ALL=C awk '$3 == "cifs" { print $2 }' /proc/mounts)
+NCPMTAB=$(LC_ALL=C awk '$3 == "ncpfs" { print $2 }' /proc/mounts)
+NETDEVMTAB=$(LC_ALL=C awk '$4 ~ /_netdev/ && $2 != "/" { print $2 }' /etc/mtab)
# See how we were called.
case "$1" in
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 7695da46..d38622c6 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -39,7 +39,7 @@ fi
# Even if VLAN is configured, without the utility we can't do much
[ ! -x /sbin/vconfig ] && VLAN=
-CWD=`pwd`
+CWD=$(pwd)
cd /etc/sysconfig/network-scripts
. ./network-functions
@@ -188,9 +188,9 @@ case "$1" in
# If this is a final shutdown/halt, check for network FS,
# and unmount them even if the user didn't turn on netfs
if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then
- NFSMTAB=`LC_ALL=C awk '$3 ~ /^nfs/ { print $2 }' /proc/mounts`
- SMBMTAB=`LC_ALL=C awk '$3 == "smbfs" { print $2 }' /proc/mounts`
- NCPMTAB=`LC_ALL=C awk '$3 == "ncpfs" { print $2 }' /proc/mounts`
+ NFSMTAB=$(LC_ALL=C awk '$3 ~ /^nfs/ { print $2 }' /proc/mounts)
+ SMBMTAB=$(LC_ALL=C awk '$3 == "smbfs" { print $2 }' /proc/mounts)
+ NCPMTAB=$(LC_ALL=C awk '$3 == "ncpfs" { print $2 }' /proc/mounts)
if [ -n "$NFSMTAB" -o -n "$SMBMTAB" -o -n "$NCPMTAB" ] ; then
/etc/init.d/netfs stop
fi
@@ -263,12 +263,12 @@ case "$1" in
if [ -d /proc/sys/net/ipv4 ]; then
if [ -f /proc/sys/net/ipv4/ip_forward ]; then
- if [ `cat /proc/sys/net/ipv4/ip_forward` != 0 ]; then
+ if [ $(cat /proc/sys/net/ipv4/ip_forward) != 0 ]; then
action $"Disabling IPv4 packet forwarding: " sysctl -w net.ipv4.ip_forward=0
fi
fi
if [ -f /proc/sys/net/ipv4/ip_always_defrag ]; then
- if [ `cat /proc/sys/net/ipv4/ip_always_defrag` != 0 ]; then
+ if [ $(cat /proc/sys/net/ipv4/ip_always_defrag) != 0 ]; then
action $"Disabling IPv4 automatic defragmentation: " sysctl -w net.ipv4.ip_always_defrag=0
fi
fi
diff --git a/rc.d/rc b/rc.d/rc
index aaa45e66..d918b7c7 100755
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -20,7 +20,7 @@ check_runlevel ()
# Now find out what the current and what the previous runlevel are.
argv1="$1"
-set `/sbin/runlevel`
+set $(/sbin/runlevel)
runlevel=$2
previous=$1
export runlevel previous
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 378129dd..1f40657c 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -5,7 +5,7 @@
# Taken in part from Miquel van Smoorenburg's bcheckrc.
#
-HOSTNAME=`/bin/hostname`
+HOSTNAME=$(/bin/hostname)
set -m
@@ -32,11 +32,11 @@ PLYMOUTH=
[ -x /usr/bin/plymouth ] && PLYMOUTH=yes
# Check SELinux status
-selinuxfs="$(fstab_decode_str `LC_ALL=C awk '/ selinuxfs / { print $2 }' /proc/mounts`)"
+selinuxfs="$(fstab_decode_str $(LC_ALL=C awk '/ selinuxfs / { print $2 }' /proc/mounts))"
SELINUX_STATE=
-if [ -n "$selinuxfs" ] && [ "`cat /proc/self/attr/current`" != "kernel" ]; then
+if [ -n "$selinuxfs" ] && [ "$(cat /proc/self/attr/current)" != "kernel" ]; then
if [ -r "$selinuxfs/enforce" ] ; then
- SELINUX_STATE=`cat "$selinuxfs/enforce"`
+ SELINUX_STATE=$(cat "$selinuxfs/enforce")
else
# assume enforcing if you can't read it
SELINUX_STATE=1
@@ -57,7 +57,7 @@ disable_selinux() {
relabel_selinux() {
# if /sbin/init is not labeled correctly this process is running in the
# wrong context, so a reboot will be required after relabel
- REBOOTFLAG=`restorecon -v /sbin/init`
+ REBOOTFLAG=$(restorecon -v /sbin/init)
AUTORELABEL=
. /etc/selinux/config
if [ "$AUTORELABEL" = "0" ]; then
@@ -263,16 +263,16 @@ if [[ "$redhat_release" =~ "Red Hat" ]]; then
[ "$BOOTUP" = "color" ] && echo -en "\\033[0;31m"
echo -en "Red Hat"
[ "$BOOTUP" = "color" ] && echo -en "\\033[0;39m"
- PRODUCT=`sed "s/Red Hat \(.*\) release.*/\1/" /etc/redhat-release`
+ PRODUCT=$(sed "s/Red Hat \(.*\) release.*/\1/" /etc/redhat-release)
echo " $PRODUCT"
elif [[ "$redhat_release" =~ "Fedora" ]]; then
[ "$BOOTUP" = "color" ] && echo -en "\\033[0;34m"
echo -en "Fedora"
[ "$BOOTUP" = "color" ] && echo -en "\\033[0;39m"
- PRODUCT=`sed "s/Fedora \(.*\) \?release.*/\1/" /etc/redhat-release`
+ PRODUCT=$(sed "s/Fedora \(.*\) \?release.*/\1/" /etc/redhat-release)
echo " $PRODUCT"
else
- PRODUCT=`sed "s/ release.*//g" /etc/redhat-release`
+ PRODUCT=$(sed "s/ release.*//g" /etc/redhat-release)
echo "$PRODUCT"
fi
if [ "$PROMPT" != "no" ]; then
@@ -384,7 +384,7 @@ if [ -f /fastboot ] || strstr "$cmdline" fastboot ; then
fi
if [ -f /fsckoptions ]; then
- fsckoptions=`cat /fsckoptions`
+ fsckoptions=$(cat /fsckoptions)
fi
if [ -f /forcefsck ] || strstr "$cmdline" forcefsck ; then
@@ -616,7 +616,7 @@ fi
remount_needed() {
local state oldifs
[ "$READONLY" = "yes" ] && return 1
- state=`LC_ALL=C awk '/ \/ / && ($3 !~ /rootfs/) { print $4 }' /proc/mounts`
+ state=$(LC_ALL=C awk '/ \/ / && ($3 !~ /rootfs/) { print $4 }' /proc/mounts)
oldifs=$IFS
IFS=","
for opt in $state ; do
diff --git a/service b/service
index d7551b56..7d7dea8e 100755
--- a/service
+++ b/service
@@ -2,8 +2,8 @@
. /etc/init.d/functions
-VERSION="`basename $0` ver. 0.91"
-USAGE="Usage: `basename $0` < option > | --status-all | \
+VERSION="$(basename $0) ver. 0.91"
+USAGE="Usage: $(basename $0) < option > | --status-all | \
[ service_name [ command | --full-restart ] ]"
SERVICE=
SERVICEDIR="/etc/init.d"
diff --git a/setsysfont b/setsysfont
index d97c40c4..1aa827a6 100755
--- a/setsysfont
+++ b/setsysfont
@@ -26,7 +26,7 @@ if [ -x /bin/setfont ]; then
fi
if [ -n "$SYSFONTACM" ]; then
if [ ! -f /lib/kbd/consoletrans/${SYSFONTACM}_to_uni.trans ]; then
- SYSFONTACM=`echo $SYSFONTACM | sed "s|iso0|8859-|g;s|iso|8859-|g"`
+ SYSFONTACM=$(echo $SYSFONTACM | sed "s|iso0|8859-|g;s|iso|8859-|g")
fi
ARGS="$ARGS -m $SYSFONTACM"
fi
diff --git a/sysconfig/network-scripts/ifdown-bnep b/sysconfig/network-scripts/ifdown-bnep
index 9c5e0a73..b8064fd8 100755
--- a/sysconfig/network-scripts/ifdown-bnep
+++ b/sysconfig/network-scripts/ifdown-bnep
@@ -18,12 +18,12 @@ fi
stop_panu()
{
- kill -TERM `cat /var/run/pand-${DEVICE}.pid`
+ kill -TERM $(cat /var/run/pand-${DEVICE}.pid)
}
stop_nap()
{
- kill -TERM `cat /var/run/pand-${DEVICE}.pid`
+ kill -TERM $(cat /var/run/pand-${DEVICE}.pid)
/usr/bin/pand -K
}
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 62dd354b..f12e3b54 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -33,9 +33,9 @@ check_device_down ${DEVICE} && [ "$BOOTPROTO" != "dhcp" -a "$BOOTPROTO" != "boot
if [ "${SLAVE}" != "yes" -o -z "${MASTER}" ]; then
if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then
- FOUNDMACADDR=`get_hwaddr ${REALDEVICE}`
+ FOUNDMACADDR=$(get_hwaddr ${REALDEVICE})
if [ -n "${FOUNDMACADDR}" -a "${FOUNDMACADDR}" != "${HWADDR}" ]; then
- NEWCONFIG=`get_config_by_hwaddr ${FOUNDMACADDR}`
+ NEWCONFIG=$(get_config_by_hwaddr ${FOUNDMACADDR})
if [ -n "${NEWCONFIG}" ]; then
eval $(LANG=C fgrep "DEVICE=" $NEWCONFIG)
else
@@ -53,7 +53,7 @@ fi
fi
if is_bonding_device ${DEVICE} ; then
- for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do
+ for device in $(LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*) ; do
is_ignored_file "$device" && continue
/sbin/ifdown ${device##*/}
done
@@ -64,14 +64,14 @@ fi
/etc/sysconfig/network-scripts/ifdown-ipv6 ${CONFIG}
if [[ "${DHCPV6C}" = [Yy1]* ]] && [ -f /var/run/dhcp6c_${DEVICE}.pid ]; then
- kill `cat /var/run/dhcp6c_${DEVICE}.pid`;
+ kill $(cat /var/run/dhcp6c_${DEVICE}.pid);
rm -f /var/run/dhcp6c_${DEVICE}.pid;
fi
retcode=0
-[ -n "`pidof -x dhclient`" ] && {
+[ -n "$(pidof -x dhclient)" ] && {
if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then
- dhcpid=`cat /var/run/dhclient-${DEVICE}.pid`
+ dhcpid=$(cat /var/run/dhclient-${DEVICE}.pid)
if [[ "$DHCPRELEASE" = [yY1]* ]]; then
/sbin/dhclient -r -lf /var/lib/dhclient/dhclient-${DEVICE}.leases -pf /var/run/dhclient-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1
retcode=$?
@@ -112,8 +112,8 @@ if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then
/usr/sbin/brctl delif ${BRIDGE} ${DEVICE}
# Upon removing a device from a bridge,
# it's necessary to make radvd reload its config
- [ -r /var/run/radvd/radvd.pid ] && kill -HUP `cat /var/run/radvd/radvd.pid`
- if [ -d /sys/class/net/${BRIDGE}/brif ] && [ `ls -1 /sys/class/net/${BRIDGE}/brif | wc -l` -eq 0 ]; then
+ [ -r /var/run/radvd/radvd.pid ] && kill -HUP $(cat /var/run/radvd/radvd.pid)
+ if [ -d /sys/class/net/${BRIDGE}/brif ] && [ $(ls -1 /sys/class/net/${BRIDGE}/brif | wc -l) -eq 0 ]; then
/usr/sbin/brctl delbr ${BRIDGE}
fi
fi
diff --git a/sysconfig/network-scripts/ifdown-ippp b/sysconfig/network-scripts/ifdown-ippp
index 3cc85640..f6fe5f12 100755
--- a/sysconfig/network-scripts/ifdown-ippp
+++ b/sysconfig/network-scripts/ifdown-ippp
@@ -28,7 +28,7 @@ isdnctrl delif $DEVICE >/dev/null 2>&1
# kill ipppd daemon
if [ -f /var/run/ipppd.$DEVICE.pid ] ; then
- pppdpid=`cat /var/run/ipppd.$DEVICE.pid`
+ pppdpid=$(cat /var/run/ipppd.$DEVICE.pid)
kill -9 $pppdpid > /dev/null 2>&1
rm -f /var/run/ipppd.$DEVICE.pid > /dev/null 2>&1
fi
diff --git a/sysconfig/network-scripts/ifdown-ipsec b/sysconfig/network-scripts/ifdown-ipsec
index 56b31c43..3167fa63 100755
--- a/sysconfig/network-scripts/ifdown-ipsec
+++ b/sysconfig/network-scripts/ifdown-ipsec
@@ -41,7 +41,7 @@ fi
[ -z "$KEYING" ] && KEYING=manual
if [ -z "$SRC" ]; then
- SRC=`ip -o route get to $DST | sed "s|.*src \([^ ]*\).*|\1|"`
+ SRC=$(ip -o route get to $DST | sed "s|.*src \([^ ]*\).*|\1|")
fi
if [ -n "$SRCNET" -o -n "$DSTNET" ]; then
@@ -56,7 +56,7 @@ if [ -n "$SRCNET" -o -n "$DSTNET" ]; then
= "NETWORK=${DSTNET%%/*}" ]; then
EXCLUDE_SRCNET=yes
fi
- [ -z "$SRCGW" ] && SRCGW=`ip -o route get to $SRCNET | sed "s|.*src \([^ ]*\).*|\1|"`
+ [ -z "$SRCGW" ] && SRCGW=$(ip -o route get to $SRCNET | sed "s|.*src \([^ ]*\).*|\1|")
ip route del to $DSTNET via $SRCGW src $SRCGW
else
MODE=transport
@@ -77,7 +77,7 @@ ${EXCLUDE_SRCNET:+spddelete $SPD_SRC $SPD_SRC any -P in;}
EOF
if [ "$KEYING" = "automatic" -a -n "$IKE_METHOD" ]; then
- racoontmp=`mktemp /etc/racoon/racoon.XXXXXX`
+ racoontmp=$(mktemp /etc/racoon/racoon.XXXXXX)
grep -v "^include \"/etc/racoon/$DST.conf\";" /etc/racoon/racoon.conf >> $racoontmp
mv -f $racoontmp /etc/racoon/racoon.conf
pidof -x /usr/sbin/racoon > /dev/null 2>&1 && killall -HUP /usr/sbin/racoon
diff --git a/sysconfig/network-scripts/ifdown-ipv6 b/sysconfig/network-scripts/ifdown-ipv6
index 2d14b6b9..c6674ca7 100755
--- a/sysconfig/network-scripts/ifdown-ipv6
+++ b/sysconfig/network-scripts/ifdown-ipv6
@@ -46,7 +46,7 @@ CONFIG=$1
source_config
# IPv6 don't need aliases anymore, config is skipped
-REALDEVICE=`echo ${DEVICE} | sed 's/:.*//g'`
+REALDEVICE=$(echo ${DEVICE} | sed 's/:.*//g')
[ "$DEVICE" != "$REALDEVICE" ] && exit 0
[ -f /etc/sysconfig/network-scripts/network-functions-ipv6 ] || exit 1
@@ -84,14 +84,14 @@ if [ $? = 0 -o $? = 11 ]; then
ipv4addr="$IPV6TO4_IPV4ADDR"
# Get IPv4 address from interface first
- ipv4addrlocal="`ipv6_get_ipv4addr_of_device $DEVICE`"
+ ipv4addrlocal="$(ipv6_get_ipv4addr_of_device $DEVICE)"
if [ -z "$ipv4addrlocal" ]; then
# Take configured from config file
ipv4addrlocal="$IPADDR"
fi
else
# Get IPv4 address from interface first (has precedence 2)
- ipv4addr="`ipv6_get_ipv4addr_of_device $DEVICE`"
+ ipv4addr="$(ipv6_get_ipv4addr_of_device $DEVICE)"
if [ -z "$ipv4addr" ]; then
# Take configured from config file (precedence 3)
ipv4addr="$IPADDR"
@@ -100,7 +100,7 @@ if [ $? = 0 -o $? = 11 ]; then
fi
# Get local IPv4 address of dedicated tunnel
- ipv4addr6to4local="`ipv6_get_ipv4addr_of_tunnel tun6to4 local`"
+ ipv4addr6to4local="$(ipv6_get_ipv4addr_of_tunnel tun6to4 local)"
if [ -z "$ipv4addrlocal" -o -z "$ipv4addr6to4local" ]; then
# no IPv4 addresses given, 6to4 sure not configured
@@ -120,7 +120,7 @@ if [ "$valid6to4config" = "yes" ]; then
if [ -n "$IPV6TO4_ROUTING" ]; then
# Delete routes to local networks
for devsuf in $IPV6TO4_ROUTING; do
- dev="`echo $devsuf | awk -F- '{ print $1 }'`"
+ dev="$(echo $devsuf | awk -F- '{ print $1 }')"
ipv6_cleanup_6to4_device $dev
done
fi
diff --git a/sysconfig/network-scripts/ifdown-ppp b/sysconfig/network-scripts/ifdown-ppp
index a3a558d8..0775f170 100755
--- a/sysconfig/network-scripts/ifdown-ppp
+++ b/sysconfig/network-scripts/ifdown-ppp
@@ -14,7 +14,7 @@ fi
CONFIG=${CONFIG##ifcfg-}
if [ "${DEMAND}" = "yes" -a -f /var/run/ppp-${CONFIG}.pid ] ; then
- PID=`head -1 /var/run/ppp-${CONFIG}.pid`
+ PID=$(head -1 /var/run/ppp-${CONFIG}.pid)
kill -TERM ${PID}
sleep 2
[ ! -d /proc/${PID} ] && exit 0
@@ -32,7 +32,7 @@ if [ ! -f $file ]; then
exit 0
fi
-PID=`cat $file`
+PID=$(cat $file)
[ -n "${PID}" ] || exit 1
kill -TERM ${PID} > /dev/null 2>&1
diff --git a/sysconfig/network-scripts/ifdown-sit b/sysconfig/network-scripts/ifdown-sit
index 20be7fa0..041dc3cd 100755
--- a/sysconfig/network-scripts/ifdown-sit
+++ b/sysconfig/network-scripts/ifdown-sit
@@ -28,7 +28,7 @@ CONFIG=$1
source_config
# IPv6 don't need aliases anymore, config is skipped
-REALDEVICE=`echo ${DEVICE} | sed 's/:.*//g'`
+REALDEVICE=$(echo ${DEVICE} | sed 's/:.*//g')
[ "$DEVICE" != "$REALDEVICE" ] && exit 0
[ -f /etc/sysconfig/network-scripts/network-functions-ipv6 ] || exit 1
diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases
index de4454e9..83f53c09 100755
--- a/sysconfig/network-scripts/ifup-aliases
+++ b/sysconfig/network-scripts/ifup-aliases
@@ -194,11 +194,11 @@ function new_interface ()
fi
if [ -z "$NETMASK" ]; then
- eval `/bin/ipcalc --netmask ${IPADDR}`
+ eval $(/bin/ipcalc --netmask ${IPADDR})
fi
if [ -z "$BROADCAST" -o "$BROADCAST" = "$default_BROADCAST" ]; then
- eval `/bin/ipcalc --broadcast ${IPADDR} ${NETMASK}`
+ eval $(/bin/ipcalc --broadcast ${IPADDR} ${NETMASK})
nma=$NETMASK; nmb=${nma#*.}; nmc=${nmb#*.};
NMGLOP="${nma%%.*}_${nmb%%.*}_${nmc%%.*}_${nmc#*.}";
if [ ${nma%%.*} -eq 0 ]; then ipnm_a=0; else ipnm_a=${ipa%%.*}; fi
@@ -208,7 +208,7 @@ function new_interface ()
CACHENAME="${NMGLOP}_${ipnm_a}_${ipnm_b}_${ipnm_c}_${ipnm_d}"
eval "
if [ -z \"\$bcastcache_${CACHENAME}\" ]; then
- eval `/bin/ipcalc --broadcast \$IPADDR \$NETMASK`
+ eval $(/bin/ipcalc --broadcast \$IPADDR \$NETMASK)
bcastcache_${CACHENAME}=\$BROADCAST
else
BROADCAST=\$bcastcache_${CACHENAME}
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 5587ec69..7c9e33b6 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -43,7 +43,7 @@ is_available ${REALDEVICE}
# bail out, if the MAC does not fit
if [ -n "${HWADDR}" ]; then
- FOUNDMACADDR=`get_hwaddr ${REALDEVICE}`
+ FOUNDMACADDR=$(get_hwaddr ${REALDEVICE})
if [ "${FOUNDMACADDR}" != "${HWADDR}" -a "${FOUNDMACADDR}" != "${MACADDR}" ]; then
echo $"Device ${DEVICE} has different MAC address than expected, ignoring."
exit 1
@@ -133,7 +133,7 @@ if [ "$ISALIAS" = no ] && is_bonding_device ${DEVICE} ; then
/sbin/ip link set dev ${DEVICE} up
[ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
- for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do
+ for device in $(LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*) ; do
is_ignored_file "$device" && continue
/sbin/ifup ${device##*/}
done
@@ -162,7 +162,7 @@ if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then
/usr/sbin/brctl addif ${BRIDGE} ${DEVICE}
# Upon adding a device to a bridge,
# it's necessary to make radvd reload its config
- [ -r /var/run/radvd/radvd.pid ] && kill -HUP `cat /var/run/radvd/radvd.pid`
+ [ -r /var/run/radvd/radvd.pid ] && kill -HUP $(cat /var/run/radvd/radvd.pid)
exit 0
fi
@@ -283,7 +283,7 @@ else
# Set a default route.
if [ -z "${GATEWAYDEV}" -o "${GATEWAYDEV}" = "${REALDEVICE}" ]; then
# set up default gateway. replace if one already exists
- if [ -n "${GATEWAY}" -a "`ipcalc --network ${GATEWAY} ${NETMASK} 2>/dev/null`" = "NETWORK=${NETWORK}" ]; then
+ if [ -n "${GATEWAY}" -a "$(ipcalc --network ${GATEWAY} ${NETMASK} 2>/dev/null)" = "NETWORK=${NETWORK}" ]; then
ip route replace default ${METRIC:+metric $METRIC} \
via ${GATEWAY} ${WINDOW:+window $WINDOW} ${SRC} \
${GATEWAYDEV:+dev $GATEWAYDEV}
@@ -304,7 +304,7 @@ fi
/etc/sysconfig/network-scripts/ifup-ipv6 ${CONFIG}
if [[ "${DHCPV6C}" = [Yy1]* ]] && [ -x /sbin/dhcp6c ]; then
/sbin/dhcp6c ${DHCPV6C_OPTIONS} ${DEVICE}
- dhcp6_pid=(`/bin/ps -eo 'pid,args' | /bin/grep "dhcp6c ${DHCPV6C_OPTIONS} ${DEVICE}" | egrep -v grep`)
+ dhcp6_pid=($(/bin/ps -eo 'pid,args' | /bin/grep "dhcp6c ${DHCPV6C_OPTIONS} ${DEVICE}" | egrep -v grep))
[ -n "$dhcp6_pid" ] && echo ${dhcp6_pid[0]} > /var/run/dhcp6c_${DEVICE}.pid
fi
diff --git a/sysconfig/network-scripts/ifup-ippp b/sysconfig/network-scripts/ifup-ippp
index 9e2f3376..643b2a8c 100755
--- a/sysconfig/network-scripts/ifup-ippp
+++ b/sysconfig/network-scripts/ifup-ippp
@@ -76,7 +76,7 @@ function start_ibod()
device=$1
if [ -f /etc/isdn/ibod.cf -a -x /usr/sbin/ibod ] ; then
ibod $device &
- pid=`pidof ibod`
+ pid=$(pidof ibod)
[ -n "$pid" ] && touch /var/lock/subsys/ibod
fi
}
@@ -109,7 +109,7 @@ function addprovider()
[ "$DEFROUTE" = "yes" ] && options="$options defaultroute deldefaultroute"
# set authentication
- _auth=`echo "$AUTH" | sed 's/[a-z -]*//g'`
+ _auth=$(echo "$AUTH" | sed 's/[a-z -]*//g')
if [ -n "$_auth" ]; then
if [ -z "$USER" -a "$DIALIN" != "on" ]; then
log_echo " Error: $1 (syncppp) user is not set"
@@ -128,7 +128,7 @@ function addprovider()
# authentication options:
# +pap and/or +chap does not work correct by dialout - remove
# them if it's configured as dialout
- [ "$DIALIN" = "on" ] || AUTH=`echo "$AUTH" | sed 's/+[a-z]*//g'`
+ [ "$DIALIN" = "on" ] || AUTH=$(echo "$AUTH" | sed 's/+[a-z]*//g')
fi
# add ISDN device
diff --git a/sysconfig/network-scripts/ifup-ipsec b/sysconfig/network-scripts/ifup-ipsec
index 9998762c..4411451c 100755
--- a/sysconfig/network-scripts/ifup-ipsec
+++ b/sysconfig/network-scripts/ifup-ipsec
@@ -65,7 +65,7 @@ fi
[ -z "$KEYING" ] && KEYING=manual
if [ -z "$SRC" ]; then
- SRC=`ip -o route get to $DST | sed "s|.*src \([^ ]*\).*|\1|"`
+ SRC=$(ip -o route get to $DST | sed "s|.*src \([^ ]*\).*|\1|")
fi
if [ -n "$SRCNET" -o -n "$DSTNET" ]; then
@@ -81,7 +81,7 @@ if [ -n "$SRCNET" -o -n "$DSTNET" ]; then
= "NETWORK=${DSTNET%%/*}" ]; then
EXCLUDE_SRCNET=yes
fi
- [ -z "$SRCGW" ] && SRCGW=`ip -o route get to $SRCNET | sed "s|.*src \([^ ]*\).*|\1|"`
+ [ -z "$SRCGW" ] && SRCGW=$(ip -o route get to $SRCNET | sed "s|.*src \([^ ]*\).*|\1|")
ip route add to $DSTNET via $SRCGW src $SRCGW
else
unset TUNNEL_MODE
@@ -206,7 +206,7 @@ if [ "$KEYING" = "automatic" -a -n "$IKE_METHOD" ]; then
;;
esac
fi
- tmpfile=`mktemp /etc/racoon/psk.XXXXXX`
+ tmpfile=$(mktemp /etc/racoon/psk.XXXXXX)
grep -v "^$DST " /etc/racoon/psk.txt > $tmpfile
echo "$DST $IKE_PSK" >> $tmpfile
mv -f $tmpfile /etc/racoon/psk.txt
@@ -265,7 +265,7 @@ EOF
EOF
esac
fi
- racoontmp=`mktemp /etc/racoon/racoon.XXXXXX`
+ racoontmp=$(mktemp /etc/racoon/racoon.XXXXXX)
grep -v "^include \"/etc/racoon/$DST.conf\";" /etc/racoon/racoon.conf >> $racoontmp
echo "include \"/etc/racoon/$DST.conf\";" >> $racoontmp
mv -f $racoontmp /etc/racoon/racoon.conf
diff --git a/sysconfig/network-scripts/ifup-ipv6 b/sysconfig/network-scripts/ifup-ipv6
index a50d1aa4..1dd30aff 100755
--- a/sysconfig/network-scripts/ifup-ipv6
+++ b/sysconfig/network-scripts/ifup-ipv6
@@ -63,7 +63,7 @@ CONFIG=$1
source_config
# IPv6 don't need aliases anymore, config is skipped
-REALDEVICE=`echo ${DEVICE} | sed 's/:.*//g'`
+REALDEVICE=$(echo ${DEVICE} | sed 's/:.*//g')
[ "$DEVICE" != "$REALDEVICE" ] && exit 0
# Test whether IPv6 configuration is enabled for this interface, else stop
@@ -89,7 +89,7 @@ if [ -n "$IPV6ADDR" ]; then
fi
# Get current global IPv6 forwarding
-ipv6_global_forwarding_current="`ipv6_exec_sysctl -n net.ipv6.conf.all.forwarding`"
+ipv6_global_forwarding_current="$(ipv6_exec_sysctl -n net.ipv6.conf.all.forwarding)"
# Set some proc switches depending on defines
if [ "$IPV6FORWARDING" = "yes" ]; then
@@ -185,14 +185,14 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
ipv4addr="$IPV6TO4_IPV4ADDR"
# Get local IPv4 address from interface
- ipv4addrlocal="`ipv6_get_ipv4addr_of_device $DEVICE`"
+ ipv4addrlocal="$(ipv6_get_ipv4addr_of_device $DEVICE)"
if [ -z "$ipv4addrlocal" ]; then
# Take configured from config file
ipv4addrlocal="$IPADDR"
fi
else
# Get IPv4 address from interface first (has precedence 2)
- ipv4addr="`ipv6_get_ipv4addr_of_device $DEVICE`"
+ ipv4addr="$(ipv6_get_ipv4addr_of_device $DEVICE)"
if [ -z "$ipv4addr" ]; then
# Take configured from config file (precedence 3)
ipv4addr="$IPADDR"
@@ -210,7 +210,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
fi
# Check/generate relay address
- ipv6to4_relay="`ipv6_create_6to4_relay_address $IPV6TO4_RELAY`"
+ ipv6to4_relay="$(ipv6_create_6to4_relay_address $IPV6TO4_RELAY)"
if [ $? -ne 0 ]; then
valid6to4config="no"
fi
@@ -222,7 +222,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
# Setup 6to4 tunnel (hardwired name is "tun6to4"), if config is valid
if [ "$valid6to4config" = "yes" ]; then
# Get MTU of master device
- ipv4mtu="`ipv6_exec_ip link show dev $DEVICE | grep -w "mtu" | awk '{ print $5 }'`"
+ ipv4mtu="$(ipv6_exec_ip link show dev $DEVICE | grep -w "mtu" | awk '{ print $5 }')"
if [ -n "$ipv4mtu" ]; then
# IPv6 tunnel MTU is IPv4 MTU minus 20 for IPv4 header
tunnelmtu=$[ $ipv4mtu - 20 ]
@@ -284,12 +284,12 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
fi
if [ -n "$IPV6TO4_ROUTING" ]; then
- ipv6to4prefix="`ipv6_create_6to4_prefix $ipv4addr`"
+ ipv6to4prefix="$(ipv6_create_6to4_prefix $ipv4addr)"
if [ -n "$ipv6to4prefix" ]; then
# Add route to local networks
for devsuf in $IPV6TO4_ROUTING; do
- dev="`echo $devsuf | awk -F- '{ print $1 }'`"
- suf="`echo $devsuf | awk -F- '{ print $2 }'`"
+ dev="$(echo $devsuf | awk -F- '{ print $1 }')"
+ suf="$(echo $devsuf | awk -F- '{ print $2 }')"
ipv6_add_addr_on_device ${dev} ${ipv6to4prefix}${suf}
done
else
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post
index af54ed94..29af56b7 100755
--- a/sysconfig/network-scripts/ifup-post
+++ b/sysconfig/network-scripts/ifup-post
@@ -27,7 +27,7 @@ if [ "$PEERDNS" != "no" ] ||[ -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; the
[ -n "$MS_DNS1" ] && DNS1=$MS_DNS1
[ -n "$MS_DNS2" ] && DNS2=$MS_DNS2
if [ -n "$DNS1" ] && ! grep -q "^nameserver $DNS1" /etc/resolv.conf &&
- tr=`mktemp /tmp/XXXXXX` ; then
+ tr=$(mktemp /tmp/XXXXXX) ; then
current_replacement="$DNS1"
next_replacement="$DNS2"
search=
@@ -71,7 +71,7 @@ if [ "$PEERDNS" != "no" ] ||[ -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; the
# maintain permissions
# but set umask in case it doesn't exist!
- oldumask=`umask`
+ oldumask=$(umask)
umask 022
change_resolv_conf $tr
rm -f $tr
diff --git a/sysconfig/network-scripts/ifup-ppp b/sysconfig/network-scripts/ifup-ppp
index d26cd21f..2a317a61 100755
--- a/sysconfig/network-scripts/ifup-ppp
+++ b/sysconfig/network-scripts/ifup-ppp
@@ -150,7 +150,7 @@ if [ "${DEMAND}" = "yes" ] ; then
# pppd is a tad slow to write the pid-file.
sleep 2
if [ -f /var/run/ppp-${DEVNAME}.pid ] ; then
- REALDEVICE=`tail -1 /var/run/ppp-${DEVNAME}.pid`
+ REALDEVICE=$(tail -1 /var/run/ppp-${DEVNAME}.pid)
/etc/sysconfig/network-scripts/ifup-routes ${REALDEVICE} ${DEVNAME}
fi
fi
diff --git a/sysconfig/network-scripts/ifup-routes b/sysconfig/network-scripts/ifup-routes
index 83a7adc3..1aa7f718 100755
--- a/sysconfig/network-scripts/ifup-routes
+++ b/sysconfig/network-scripts/ifup-routes
@@ -10,7 +10,7 @@ handle_file () {
. $1
routenum=0
while [ "x$(eval echo '$'ADDRESS$routenum)x" != "xx" ]; do
- eval `ipcalc -p $(eval echo '$'ADDRESS$routenum) $(eval echo '$'NETMASK$routenum)`
+ eval $(ipcalc -p $(eval echo '$'ADDRESS$routenum) $(eval echo '$'NETMASK$routenum))
line="$(eval echo '$'ADDRESS$routenum)/$PREFIX"
if [ "x$(eval echo '$'GATEWAY$routenum)x" != "xx" ]; then
line="$line via $(eval echo '$'GATEWAY$routenum)"
diff --git a/sysconfig/network-scripts/ifup-sit b/sysconfig/network-scripts/ifup-sit
index b3206297..ac070c96 100755
--- a/sysconfig/network-scripts/ifup-sit
+++ b/sysconfig/network-scripts/ifup-sit
@@ -40,7 +40,7 @@ CONFIG=$1
source_config
# IPv6 don't need aliases anymore, config is skipped
-REALDEVICE=`echo ${DEVICE} | sed 's/:.*//g'`
+REALDEVICE=$(echo ${DEVICE} | sed 's/:.*//g')
[ "$DEVICE" != "$REALDEVICE" ] && exit 0
# Test whether IPv6 configuration is enabled for this interface, else stop
diff --git a/sysconfig/network-scripts/ifup-wireless b/sysconfig/network-scripts/ifup-wireless
index 18416b1b..d965cb89 100755
--- a/sysconfig/network-scripts/ifup-wireless
+++ b/sysconfig/network-scripts/ifup-wireless
@@ -46,7 +46,7 @@ fi
# This is a bit hackish, but should do the job right...
if [ -n "$ESSID" -o -n "$MODE" ] ; then
- NICKNAME=`/bin/hostname`
+ NICKNAME=$(/bin/hostname)
iwconfig $DEVICE nick "$NICKNAME" >/dev/null 2>&1
fi
# Regular stuff...
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 7d5053e9..fe10aae8 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -47,9 +47,9 @@ need_config ()
[ -f "${CONFIG}" ] && return
CONFIG="${1##*/}"
[ -f "${CONFIG}" ] && return
- local addr=`get_hwaddr ${1}`
+ local addr=$(get_hwaddr ${1})
if [ -n "$addr" ]; then
- nconfig=`get_config_by_hwaddr ${addr}`
+ nconfig=$(get_config_by_hwaddr ${addr})
if [ -n "$nconfig" ] ; then
CONFIG=${nconfig##*/}
[ -f "${CONFIG}" ] && return
@@ -108,7 +108,7 @@ source_config ()
DEVICETYPE="sit"
;;
esac
- [ -z "$DEVICETYPE" ] && DEVICETYPE=`echo ${DEVICE} | sed "s/[0-9]*$//"`
+ [ -z "$DEVICETYPE" ] && DEVICETYPE=$(echo ${DEVICE} | sed "s/[0-9]*$//")
[ -z "$REALDEVICE" -a -n "$PARENTDEVICE" ] && REALDEVICE=$PARENTDEVICE
[ -z "$REALDEVICE" ] && REALDEVICE=${DEVICE%%:*}
if [ "${DEVICE}" != "${REALDEVICE}" ]; then
@@ -117,10 +117,10 @@ source_config ()
ISALIAS=no
fi
if [ -n "$HWADDR" ]; then
- HWADDR=`echo $HWADDR | awk '{ print toupper($0) }'`
+ HWADDR=$(echo $HWADDR | awk '{ print toupper($0) }')
fi
if [ -n "$MACADDR" ]; then
- MACADDR=`echo $MACADDR | awk '{ print toupper($0) }'`
+ MACADDR=$(echo $MACADDR | awk '{ print toupper($0) }')
fi
}
@@ -129,19 +129,19 @@ source_config ()
expand_config ()
{
if [ -z "${NETMASK}" ]; then
- eval `/bin/ipcalc --netmask ${IPADDR}`
+ eval $(/bin/ipcalc --netmask ${IPADDR})
fi
if [ -z "${PREFIX}" ]; then
- eval `/bin/ipcalc --prefix ${IPADDR} ${NETMASK}`
+ eval $(/bin/ipcalc --prefix ${IPADDR} ${NETMASK})
fi
if [ -z "${BROADCAST}" ]; then
- eval `/bin/ipcalc --broadcast ${IPADDR} ${NETMASK}`
+ eval $(/bin/ipcalc --broadcast ${IPADDR} ${NETMASK})
fi
if [ -z "${NETWORK}" ]; then
- eval `/bin/ipcalc --network ${IPADDR} ${NETMASK}`
+ eval $(/bin/ipcalc --network ${IPADDR} ${NETMASK})
fi
}
@@ -162,9 +162,9 @@ do_netreport ()
( cd /var/run/netreport || exit
for i in * ; do
if [ -f $i ]; then
- OWNER=`ls -l $i | awk '{ print $3 }'`
+ OWNER=$(ls -l $i | awk '{ print $3 }')
- if [ "`id -u`" = "0" ]; then
+ if [ "$(id -u)" = "0" ]; then
su -s /bin/bash $OWNER -c "kill -SIGIO $i >/dev/null 2>&1 || rm -f $i >/dev/null 2>&1" > /dev/null 2>&1
else
kill -SIGIO $i >/dev/null 2>&1 || rm -f $i >/dev/null 2>&1
@@ -197,7 +197,7 @@ END {
return 1
}
if [ -n "$HWADDR" ]; then
- local curdev=`get_device_by_hwaddr "$HWADDR"`
+ local curdev=$(get_device_by_hwaddr "$HWADDR")
if [ -z "$curdev" ]; then
return 1
fi
@@ -213,7 +213,7 @@ END {
need_hostname ()
{
- CHECK_HOSTNAME=`hostname`
+ CHECK_HOSTNAME=$(hostname)
if [ "$CHECK_HOSTNAME" = "(none)" -o "$CHECK_HOSTNAME" = "localhost" -o \
"$CHECK_HOSTNAME" = "localhost.localdomain" ]; then
return 0
@@ -226,9 +226,9 @@ set_hostname ()
{
hostname $1
if ! grep search /etc/resolv.conf >/dev/null 2>&1; then
- domain=`echo $1 | sed 's/^[^\.]*\.//'`
+ domain=$(echo $1 | sed 's/^[^\.]*\.//')
if [ -n "$domain" ]; then
- rsctmp=`mktemp /tmp/XXXXXX`;
+ rsctmp=$(mktemp /tmp/XXXXXX);
cat /etc/resolv.conf > $rsctmp
echo "search $domain" >> $rsctmp
change_resolv_conf $rsctmp
@@ -257,7 +257,7 @@ check_device_down ()
check_ethtool ()
{
[ -x /sbin/ethtool ] || return 2
- output=`LC_ALL=C ethtool $1 2>&1`
+ output=$(LC_ALL=C ethtool $1 2>&1)
echo $output | LC_ALL=C grep -q "Link detected: yes" && return 1
echo $output | LC_ALL=C grep -q "Link detected: no" && return 0 || return 2
}
@@ -356,7 +356,7 @@ is_bonding_device ()
# Invoke this when /etc/resolv.conf has changed:
change_resolv_conf ()
{
- s=`/bin/grep '^[\ \ ]*option' /etc/resolv.conf 2>/dev/null`;
+ s=$(/bin/grep '^[\ \ ]*option' /etc/resolv.conf 2>/dev/null);
if [ "x$s" != "x" ]; then
s="$s"$'\n';
fi;
@@ -378,9 +378,9 @@ change_resolv_conf ()
done;
elif [ $# -eq 1 ]; then
if [ "x$s" != "x" ]; then
- s="$s"`/bin/grep -vF "$s" $1`;
+ s="$s"$(/bin/grep -vF "$s" $1);
else
- s=`cat $1`;
+ s=$(cat $1);
fi;
fi;
(echo "$s" > /etc/resolv.conf;) >/dev/null 2>&1;
diff --git a/sysconfig/network-scripts/network-functions-ipv6 b/sysconfig/network-scripts/network-functions-ipv6
index 1bf230b7..d56d7436 100644
--- a/sysconfig/network-scripts/network-functions-ipv6
+++ b/sysconfig/network-scripts/network-functions-ipv6
@@ -38,7 +38,7 @@ ipv6_log() {
# Map loglevel now
local fn=1
local fnawk="print \$$fn"
- local t="`echo $level | awk -F. "{ $fnawk }"`"
+ local t="$(echo $level | awk -F. "{ $fnawk }")"
# Check channel, if given
case $t in
@@ -54,7 +54,7 @@ ipv6_log() {
# Check syslog facilty, if given
if [ "$channel" = "syslog" ]; then
local fnawk="print \$$fn"
- local t="`echo $level | awk -F. "{ $fnawk }"`"
+ local t="$(echo $level | awk -F. "{ $fnawk }")"
case $t in
'local0'|'local1'|'local2'|'local3'|'local4'|'local5'|'local6'|'local7'|'daemon')
local facility="$t"
@@ -67,7 +67,7 @@ ipv6_log() {
fi
local fnawk="print \$$fn"
- local t="`echo $level | awk -F. "{ $fnawk }"`"
+ local t="$(echo $level | awk -F. "{ $fnawk }")"
# Map priority
[ "$t" = "inf" ] && local t="info"
@@ -88,7 +88,7 @@ ipv6_log() {
esac
local fnawk="print \$$fn"
- local t="`echo $level | awk -F. "{ $fnawk }"`"
+ local t="$(echo $level | awk -F. "{ $fnawk }")"
if [ -n "$t" ]; then
echo $"ERROR: [ipv6_log] Loglevel isn't valid '$level' (arg 2)" >/dev/stderr
return 1
@@ -205,7 +205,7 @@ ipv6_test() {
##### Get version of this function library
# stdout: <version number YYYYMMDD>
getversion_ipv6_functions() {
- local version_ipv6_functions="`cat /etc/sysconfig/network-scripts/network-functions-ipv6 | LC_ALL=C grep "^# Version:" | awk '{ print $3 }' | sed 's/-//g' | sed 's/[A-Za-z]*$//g'`"
+ local version_ipv6_functions="$(cat /etc/sysconfig/network-scripts/network-functions-ipv6 | LC_ALL=C grep "^# Version:" | awk '{ print $3 }' | sed 's/-//g' | sed 's/[A-Za-z]*$//g')"
echo $version_ipv6_functions
return 0
}
@@ -336,12 +336,12 @@ ipv6_add_route() {
ipv6_test_ipv6_addr_valid $gatewayipv6 || return 2
if [ -z "$device" ]; then
- local returntxt="`ipv6_exec_ip -6 route add $networkipv6 via $gatewayipv6 metric 1 2>&1`"
+ local returntxt="$(ipv6_exec_ip -6 route add $networkipv6 via $gatewayipv6 metric 1 2>&1)"
else
if [ "$gatewayipv6" = "::" ]; then
- local returntxt="`ipv6_exec_ip -6 route add $networkipv6 dev $device metric 1 2>&1`"
+ local returntxt="$(ipv6_exec_ip -6 route add $networkipv6 dev $device metric 1 2>&1)"
else
- local returntxt="`ipv6_exec_ip -6 route add $networkipv6 via $gatewayipv6 dev $device metric 1 2>&1`"
+ local returntxt="$(ipv6_exec_ip -6 route add $networkipv6 via $gatewayipv6 dev $device metric 1 2>&1)"
fi
fi
@@ -558,8 +558,8 @@ ipv6_add_addr_on_device() {
fi
# Extract address parts
- local prefixlength_implicit="`echo $address | awk -F/ '{ print $2 }'`"
- local address_implicit="`echo $address | awk -F/ '{ print $1 }'`"
+ local prefixlength_implicit="$(echo $address | awk -F/ '{ print $2 }')"
+ local address_implicit="$(echo $address | awk -F/ '{ print $1 }')"
# Check prefix length and using '64' as default
if [ -z "$prefixlength_implicit" ]; then
@@ -664,8 +664,8 @@ ipv6_del_addr_on_device() {
ipv6_test_ipv6_addr_valid $address || return 1
# Extract address parts
- local prefixlength_implicit="`echo $address | awk -F/ '{ print $2 }'`"
- local address_implicit="`echo $address | awk -F/ '{ print $1 }'`"
+ local prefixlength_implicit="$(echo $address | awk -F/ '{ print $2 }')"
+ local address_implicit="$(echo $address | awk -F/ '{ print $1 }')"
# Check prefix length and using '64' as default
if [ -z "$prefixlength_implicit" ]; then
@@ -781,24 +781,24 @@ ipv6_create_6to4_prefix() {
ipv6_log $"Missing parameter 'IPv4 address' (arg 1)" stderr.err $fn
fi
- local major1="`echo $ipv4addr | awk -F. '{ print $1 }'`"
- local minor1="`echo $ipv4addr | awk -F. '{ print $2 }'`"
- local major2="`echo $ipv4addr | awk -F. '{ print $3 }'`"
- local minor2="`echo $ipv4addr | awk -F. '{ print $4 }'`"
+ local major1="$(echo $ipv4addr | awk -F. '{ print $1 }')"
+ local minor1="$(echo $ipv4addr | awk -F. '{ print $2 }')"
+ local major2="$(echo $ipv4addr | awk -F. '{ print $3 }')"
+ local minor2="$(echo $ipv4addr | awk -F. '{ print $4 }')"
if [ -z "$major1" -o -z "$minor1" -o -z "$major2" -o -z "$minor2" ]; then
return 1
fi
if [ $major1 -eq 0 ]; then
- local block1="`printf "%x" $minor1`"
+ local block1="$(printf "%x" $minor1)"
else
- local block1="`printf "%x%02x" $major1 $minor1`"
+ local block1="$(printf "%x%02x" $major1 $minor1)"
fi
if [ $major2 -eq 0 ]; then
- local block2="`printf "%x" $minor2`"
+ local block2="$(printf "%x" $minor2)"
else
- local block2="`printf "%x%02x" $major2 $minor2`"
+ local block2="$(printf "%x%02x" $major2 $minor2)"
fi
local prefix6to4="2002:$block1:$block2"
@@ -885,7 +885,7 @@ ipv6_add_6to4_tunnel() {
ipv6_test || return 2
# Generate 6to4 address
- local prefix6to4="`ipv6_create_6to4_prefix $globalipv4`"
+ local prefix6to4="$(ipv6_create_6to4_prefix $globalipv4)"
if [ $? -ne 0 -o -z "$prefix6to4" ]; then
return 3
fi
@@ -1016,7 +1016,7 @@ ipv6_add_tunnel_device() {
ipv6_test || return 2
if ! ipv6_test_device_status $device; then
- local ttldefault="`ipv6_exec_sysctl net.ipv4.ip_default_ttl | awk '{ print $3 }'`"
+ local ttldefault="$(ipv6_exec_sysctl net.ipv4.ip_default_ttl | awk '{ print $3 }')"
if [ -z "$ttldefault" ]; then
local ttldefault=64
fi
@@ -1160,9 +1160,9 @@ ipv6_get_ipv4addr_of_tunnel() {
# Device exists, retrieve address
if [ "$selection" = "local" ]; then
- local tunnel_local_ipv4addr="`ipv6_exec_ip tunnel show $device | awk '{ print $6 }'`"
+ local tunnel_local_ipv4addr="$(ipv6_exec_ip tunnel show $device | awk '{ print $6 }')"
elif [ "$selection" = "remote" ]; then
- local tunnel_local_ipv4addr="`ipv6_exec_ip tunnel show $device | awk '{ print $4 }'`"
+ local tunnel_local_ipv4addr="$(ipv6_exec_ip tunnel show $device | awk '{ print $4 }')"
fi
if [ $? != 0 ]; then
@@ -1201,7 +1201,7 @@ ipv6_get_ipv4addr_of_device() {
fi
# Device exists, retrieve the first address only
- local ipv4addr="`ipv6_exec_ip -o -4 addr show dev $device | awk '{ print $4 }' | awk -F/ '{ print $1; exit }'`"
+ local ipv4addr="$(ipv6_exec_ip -o -4 addr show dev $device | awk '{ print $4 }' | awk -F/ '{ print $1; exit }')"
if [ $? != 0 ]; then
return 3
@@ -1272,8 +1272,8 @@ ipv6_set_default_route() {
fi
if [ -n "$address" ]; then
- local addressgw=`echo $address | awk -F% '{ print $1 }'`
- local device_scope=`echo $address | awk -F% '{ print $2 }'`
+ local addressgw=$(echo $address | awk -F% '{ print $1 }')
+ local device_scope=$(echo $address | awk -F% '{ print $2 }')
if [ -z "$addressgw" ]; then
ipv6_log $"Given IPv6 default gateway '$address' is not in proper format" err $fn
@@ -1446,7 +1446,7 @@ ipv6_trigger_radvd() {
fi
# Get PID
- local pid="`cat $pidfile`"
+ local pid="$(cat $pidfile)"
if [ -z "$pid" ]; then
# pidfile empty - strange
ipv6_log $"Pidfile '$pidfile' is empty, cannot send trigger to radvd" err $fn