From e48b528b79966b5a0a36cd2d28b4933df46ae467 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 6 Jan 2013 09:42:29 +0000 Subject: [PATCH] /etc/init.d/scst: Introduce character classes and change one tab into a space (merge r4685 and r4686 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4688 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/init.d/scst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scstadmin/init.d/scst b/scstadmin/init.d/scst index bd0ed7083..a316b3b67 100755 --- a/scstadmin/init.d/scst +++ b/scstadmin/init.d/scst @@ -126,9 +126,9 @@ parse_scst_conf() { if [ ! -e $SCST_CFG ]; then return 0 fi - local nonblanks="[^ ]\{1,\}" - local blanks="[ ]\{1,\}" - local optblanks="[ ]*" + local nonblanks="[^[:blank:]]\{1,\}" + local blanks="[[:blank:]]\{1,\}" + local optblanks="[[:blank:]]*" SCST_MODULES="$SCST_MODULES `sed -n -e 's/^HANDLER'"$blanks"'\('"$nonblanks"'\)'"$blanks"'{'"$optblanks"'$/\1/p' \ -e 's/^\[HANDLER'"$blanks"'\('"$nonblanks"'\)\]$/\1/p' $SCST_CFG \ | while read h; do @@ -240,7 +240,7 @@ start_scst() { tmpout=/tmp/scstadmin-output-$$ if scstadmin -config $SCST_CFG >$tmpout 2>&1; then rm -f $tmpout - return 0 + return 0 else cat $tmpout rm -f $tmpout