From 655de403ad25a5332b25174009107884f9b30420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 19 Dec 2009 16:13:21 +0200 Subject: Simplify various string match constructs. --- rc.d/rc.sysinit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rc.d/rc.sysinit') 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 -- cgit v1.2.1