aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/halt2
-rw-r--r--rc.d/init.d/netconsole2
-rwxr-xr-xrc.d/init.d/network2
-rwxr-xr-xrc.d/rc.sysinit8
4 files changed, 7 insertions, 7 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 7144d3da..8cb437fc 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -116,7 +116,7 @@ tmpfs=$(awk '$2 ~ /^\/($|proc|dev)/ { next; }
if [ -n "$SWAPS" ]; then
action $"Turning off swap: " swapoff $SWAPS
for dst in $SWAPS; do
- if [[ "$dst" =~ ^/dev/mapper ]] \
+ if [[ "$dst" == /dev/mapper* ]] \
&& [ "$(dmsetup status "$dst" | cut -d ' ' -f 3)" = crypt ]; then
backdev=$(/sbin/cryptsetup status "$dst" \
| awk '$1 == "device:" { print $2 }')
diff --git a/rc.d/init.d/netconsole b/rc.d/init.d/netconsole
index 17296f8e..7f91a6c6 100644
--- a/rc.d/init.d/netconsole
+++ b/rc.d/init.d/netconsole
@@ -47,7 +47,7 @@ print_address_info ()
[ -z "$DEV" ] && DEV=$(echo $route | sed "s|.* dev \([^ ]*\).*|\1|")
echo "DEV=$DEV"
echo "LOCALADDR=$(echo $route | sed "s|.* src \([^ ]*\).*|\1|")"
- if echo $route | grep -q " via " ; then
+ if [[ $route == *" via "* ]] ; then
via=$(echo $route | sed "s|.* via \([^ ]*\).*|\1|")
target=$via
else
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 40802432..d8d39089 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -183,7 +183,7 @@ case "$1" in
rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/" && $3 != "rootfs") { print $3; }}' /proc/mounts)
rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab)
- if [[ "$rootfs" =~ ^nfs ]] || [[ "$rootopts" =~ "_netdev|_rnetdev" ]] ; then
+ if [[ "$rootfs" == nfs* || "$rootopts" =~ "_r?netdev" ]] ; then
exit 1
fi
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 1b6f1428..0756def5 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -258,13 +258,13 @@ init_crypto() {
# Print a text banner.
echo -en $"\t\tWelcome to "
read -r redhat_release < /etc/redhat-release
-if [[ "$redhat_release" =~ "Red Hat" ]]; then
+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)
echo " $PRODUCT"
-elif [[ "$redhat_release" =~ "Fedora" ]]; then
+elif [[ "$redhat_release" == *Fedora* ]]; then
[ "$BOOTUP" = "color" ] && echo -en "\\033[0;34m"
echo -en "Fedora"
[ "$BOOTUP" = "color" ] && echo -en "\\033[0;39m"
@@ -365,7 +365,7 @@ fi
dmraidsets=$(LC_ALL=C /sbin/dmraid -s -c -i)
if [ "$dmraidsets" != "no raid disks" -a "$dmraidsets" != "no block devices found" ]; then
for dmname in $dmraidsets; do
- if [[ "$dmname" =~ '^isw_.*' ]] && \
+ if [[ "$dmname" == isw_* ]] && \
! strstr "$cmdline" noiswmd; then
continue
fi
@@ -565,7 +565,7 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then
fi
fi
-if ! [[ " $fsckoptions" =~ " -y" ]]; then
+if [[ " $fsckoptions" != *" -y"* ]]; then
fsckoptions="-a $fsckoptions"
fi