Follow-up for r3816: make sure that /etc/init.d/scst restart works again

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3826 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2011-08-21 08:21:31 +00:00
parent 08a80a59bc
commit 24fc29b9d6

View File

@@ -104,12 +104,15 @@ using_iscsi() {
# Parse scst.conf and assign the list of associated kernel modules to
# SCST_MODULES.
parse_scst_conf() {
SCST_MODULES="scst"
SCST_OPT_MODULES=""
SCST_DAEMONS=""
if [ ! -e $SCST_CFG ]; then
return 1
fi
local nonblanks="[^ ]\{1,\}"
local blanks="[ ]\{1,\}"
SCST_MODULES="scst `sed -n -e 's/^HANDLER'"$blanks"'\('"$nonblanks"'\)'"$blanks"'{$/\1/p' \
SCST_MODULES="$SCST_MODULES `sed -n -e 's/^HANDLER'"$blanks"'\('"$nonblanks"'\)'"$blanks"'{$/\1/p' \
-e 's/^\[HANDLER'"$blanks"'\('"$nonblanks"'\)\]$/\1/p' $SCST_CFG \
| while read h; do
case "$h" in