diff options
Diffstat (limited to 'rc.d/init.d')
-rw-r--r-- | rc.d/init.d/functions | 2 | ||||
-rwxr-xr-x | rc.d/init.d/halt | 2 | ||||
-rw-r--r-- | rc.d/init.d/netconsole | 2 | ||||
-rwxr-xr-x | rc.d/init.d/netfs | 16 | ||||
-rwxr-xr-x | rc.d/init.d/network | 12 |
5 files changed, 17 insertions, 17 deletions
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 |