From: Bart V. A. <bva...@ac...> - 2011-12-30 11:40:29
|
From 913a642d05ba5457fa2955a90ed04c04c7ea1e65 Mon Sep 17 00:00:00 2001 From: Bart Van Assche <bva...@ac...> Date: Fri, 30 Dec 2011 11:08:27 +0000 Subject: [PATCH] scstadmin: Allow iscsi-scstd options to be specified in /etc/default/scst --- scstadmin/default/scst | 3 +++ scstadmin/init.d/scst | 6 +++++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/scstadmin/default/scst b/scstadmin/default/scst index 14873bb..09a86db 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 6e3648c..318d9ff 100755 --- a/scstadmin/init.d/scst +++ b/scstadmin/init.d/scst @@ -208,7 +208,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 -- 1.7.7 |