From 372373cf5fc6e0fa73599cd9b925d1d97c13251d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 12 Jan 2012 17:36:49 +0000 Subject: [PATCH] scstadmin: Allow iscsi-scstd command-line options to be specified in /etc/default/scst git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4066 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/default/scst | 3 +++ scstadmin/init.d/scst | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scstadmin/default/scst b/scstadmin/default/scst index 14873bb79..09a86dbcd 100644 --- a/scstadmin/default/scst +++ b/scstadmin/default/scst @@ -1,3 +1,6 @@ +# iscsi-scstd command-line options. See also man iscsi-scstd. +# ISCSID_OPTIONS="-u0 -g0 -p3260" + # When using the procfs interface, specify all SCST target drivers in # SCST_TARGET_MODULES. An example: # SCST_TARGET_MODULES="scst_local iscsi_scst ib_srpt" diff --git a/scstadmin/init.d/scst b/scstadmin/init.d/scst index ea5cfcaf4..abb8105d2 100755 --- a/scstadmin/init.d/scst +++ b/scstadmin/init.d/scst @@ -222,7 +222,11 @@ start_scst() { done for d in $SCST_DAEMONS; do - if ! start_daemon $d; then + options="" + if [ "$(basename "$d")" = "iscsi-scstd" ]; then + options="${ISCSID_OPTIONS}" + fi + if ! start_daemon $d $options; then echo "Starting $d failed" unload_scst return 1