From aa199d8ef6f61efaababe3478b0df9fffdc221b5 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 11 Jun 2011 10:26:25 +0000 Subject: [PATCH] /etc/init.d/scst: Relax parsing of /etc/scst.conf. Accept sequences of blanks and tabs instead of only spaces when looking for device handler and target driver names. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3568 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/init.d/scst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scstadmin/init.d/scst b/scstadmin/init.d/scst index 724029c77..801593540 100755 --- a/scstadmin/init.d/scst +++ b/scstadmin/init.d/scst @@ -81,8 +81,9 @@ parse_scst_conf() { if [ ! -e $SCST_CFG ]; then return 1 fi + local blanks="[ ]\{1,\}" SCST_MODULES="scst ` - sed -n -e 's/^HANDLER \(.*\) {$/\1/p' -e 's/^\[HANDLER \(.*\)\]$/\1/p' \ + sed -n -e 's/^HANDLER'"$blanks"'\(.*\)'"$blanks"'{$/\1/p' -e 's/^\[HANDLER'"$blanks"'\(.*\)\]$/\1/p' \ $SCST_CFG \ | while read h; do case "$h" in @@ -98,7 +99,7 @@ parse_scst_conf() { *) echo "$h";; esac done | sort -u; - sed -n 's/^TARGET_DRIVER \(.*\) {$/\1/p' $SCST_CFG | while read d; do + sed -n 's/^TARGET_DRIVER'"$blanks"'\(.*\)'"$blanks"'{$/\1/p' $SCST_CFG | while read d; do case "$d" in iscsi) echo iscsi_scst;; qla2x00t) echo qla2x00tgt;;