mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 11:41:26 +00:00
/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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user