aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-07-29 17:26:33 -0400
committerBill Nottingham <notting@redhat.com>2009-07-30 12:24:33 -0400
commit1096cd2ebc150e5c74b5e8e4016b835f34cd3f48 (patch)
tree5581822887866deec1c54bacb72b732589d0e52f /rc.d/rc.sysinit
parent48573c2f689c0b7b0aefcb230ce32a7f0fb9d843 (diff)
downloadinitscripts-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 'rc.d/rc.sysinit')
-rwxr-xr-xrc.d/rc.sysinit20
1 files changed, 10 insertions, 10 deletions
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