diff options
author | Bill Nottingham <notting@redhat.com> | 2009-07-29 17:26:33 -0400 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2009-07-30 12:24:33 -0400 |
commit | 1096cd2ebc150e5c74b5e8e4016b835f34cd3f48 (patch) | |
tree | 5581822887866deec1c54bacb72b732589d0e52f /sysconfig/network-scripts/ifup-eth | |
parent | 48573c2f689c0b7b0aefcb230ce32a7f0fb9d843 (diff) | |
download | initscripts-1096cd2ebc150e5c74b5e8e4016b835f34cd3f48.tar initscripts-1096cd2ebc150e5c74b5e8e4016b835f34cd3f48.tar.gz initscripts-1096cd2ebc150e5c74b5e8e4016b835f34cd3f48.tar.bz2 initscripts-1096cd2ebc150e5c74b5e8e4016b835f34cd3f48.tar.xz initscripts-1096cd2ebc150e5c74b5e8e4016b835f34cd3f48.zip |
Use $() instead of `` for process expansion.
Adapted from <victor.lowther@gmail.com>.
Diffstat (limited to 'sysconfig/network-scripts/ifup-eth')
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 10 |
1 files changed, 5 insertions, 5 deletions
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 |