aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2009-12-19 16:13:21 +0200
committerPetr Lautrbach <plautrba@redhat.com>2010-12-06 15:32:03 +0100
commite2f34b7d86738a1413abd4b93fa7294bf115ab60 (patch)
tree78b00613621959e1f737762fa1457f51c972058b /rc.d/rc.sysinit
parenta14d34e722acc6f9eb01b56f96032e9704ceed99 (diff)
downloadinitscripts-e2f34b7d86738a1413abd4b93fa7294bf115ab60.tar
initscripts-e2f34b7d86738a1413abd4b93fa7294bf115ab60.tar.gz
initscripts-e2f34b7d86738a1413abd4b93fa7294bf115ab60.tar.bz2
initscripts-e2f34b7d86738a1413abd4b93fa7294bf115ab60.tar.xz
initscripts-e2f34b7d86738a1413abd4b93fa7294bf115ab60.zip
Simplify various string match constructs. (#558575)
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-xrc.d/rc.sysinit8
1 files changed, 4 insertions, 4 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index f788744c..ecf53688 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -88,13 +88,13 @@ relabel_selinux() {
# Print a text banner.
echo -en $"\t\tWelcome to "
read -r system_release < /etc/system-release
-if [[ "$system_release" =~ "Red Hat" ]]; then
+if [[ "$system_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/system-release)
echo " $PRODUCT"
-elif [[ "$system_release" =~ "Fedora" ]]; then
+elif [[ "$system_release" == *Fedora* ]]; then
[ "$BOOTUP" = "color" ] && echo -en "\\033[0;34m"
echo -en "Fedora"
[ "$BOOTUP" = "color" ] && echo -en "\\033[0;39m"
@@ -183,7 +183,7 @@ if ! strstr "$cmdline" nodmraid && [ -x /sbin/dmraid ]; then
dmraidsets=$(LC_ALL=C /sbin/dmraid -s -c -i)
if [ "$?" = "0" ]; then
for dmname in $dmraidsets; do
- if [[ "$dmname" =~ '^isw_.*' ]] && \
+ if [[ "$dmname" == isw_* ]] && \
! strstr "$cmdline" noiswmd; then
continue
fi
@@ -386,7 +386,7 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then
fi
fi
-if ! [[ " $fsckoptions" =~ " -y" ]]; then
+if [[ " $fsckoptions" != *" -y"* ]]; then
fsckoptions="-a $fsckoptions"
fi