diff --git a/scstadmin/init.d/scst b/scstadmin/init.d/scst index 4874215f0..8f6cec0c7 100755 --- a/scstadmin/init.d/scst +++ b/scstadmin/init.d/scst @@ -49,7 +49,6 @@ SCST_MODULES="scst scst_disk scst_vdisk" # [ -x "$(which scstadmin)" ] || exit 5 -[ -f $SCST_CFG ] || exit 6 . /lib/lsb/init-functions @@ -65,12 +64,16 @@ case "$1" in fi done - if scstadmin -config $SCST_CFG >/dev/null 2>&1; then - log_success_msg - else - log_failure_msg - exit 1 + if [ -f $SCST_CFG ]; then + if scstadmin -config $SCST_CFG >/dev/null 2>&1; then + log_success_msg + else + log_failure_msg + exit 1 + fi fi + + log_success_msg ;; stop) ## Stop the service. diff --git a/scstadmin/init.d/scst.gentoo b/scstadmin/init.d/scst.gentoo index 3efaa135a..c68ba89a9 100755 --- a/scstadmin/init.d/scst.gentoo +++ b/scstadmin/init.d/scst.gentoo @@ -50,7 +50,6 @@ SCST_MODULES="scst scst_disk scst_vdisk" checkconfig() { if [ ! -f $SCST_CFG ] ; then eerror "Please create $SCST_CFG" - eerror "Do touch $SCST_CFG, and run scstadmin" return 1 fi return 0 @@ -67,7 +66,7 @@ checkinstall() { start() { ebegin "Loading and configuring the mid-level SCSI target SCST" eindent - checkconfig || return $? + checkconfig checkinstall || return $? ret=0 for module in ${SCST_MODULES}; do @@ -80,11 +79,16 @@ start() { done einfo "Configuring SCST..." eindent - if scstadmin -config $SCST_CFG >/dev/null 2>&1; then - einfo "SCST config was loaded" - else - eend $? "SCST config could not be loaded" - return $? + if [ -f $SCST_CFG ]; then + if scstadmin -config $SCST_CFG >/dev/null 2>&1; then + einfo "SCST config was loaded" + else + eend $? "SCST config could not be loaded" + return $? + fi + else + einfo "SCST configuration file $SCST_CFG missing, skipping" + return 0 fi eoutdent eoutdent