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 d81a16533..5b3a3fdc8 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 diff --git a/scstadmin/scstadmin.sysfs/man5/scst.5 b/scstadmin/scstadmin.sysfs/man5/scst.5 index 6e50e44d7..f28237310 100644 --- a/scstadmin/scstadmin.sysfs/man5/scst.5 +++ b/scstadmin/scstadmin.sysfs/man5/scst.5 @@ -4,16 +4,25 @@ .\" under the terms of the GNU General Public License, version 2 (GPLv2). .TH scst 5 "July 2011" "scstadmin 2.0.0" .SH NAME -scst \- /etc/init.d/scst configuration file. +/etc/default/scst \- Configuration file read by /etc/init.d/scst. .SH DESCRIPTION /etc/default/scst is a configuration file read by the SCST startup script -/etc/init.d/scst and contains zero or more variables that control the behavior -of that startup script. Currently there is only one such variable, -SCST_TARGET_MODULES, and it only has to be set when using the procfs interface. +/etc/init.d/scst. It contains zero or more variables that control the behavior +of that startup script. The recognized variables are: +.TP +.B ISCSID_OPTIONS +Specifies which command-line options will be passed to iscsi-scstd by the SCST +init script when SCST is started. This variable is ignored if no iSCSI target +entries have been defined in /etc/scst.conf. See also the iscsi-scstd man page +for more information about the supported command-line options. +.TP +.B SCST_TARGET_MODULES +This variable has only to be set when the procfs interface of SCST is being +used instead of the sysfs interface. It defines which target modules should be +loaded by the SCST init script when SCST is started and also which target +modules should be unloaded when SCST is stopped. .P -The format of the -.I scst -file is as follows: +The format of the /etc/default/scst file is as follows: .br - Blank lines and lines starting with a hash sign (#) are ignored. .br @@ -23,6 +32,13 @@ surrounded with double quotes. .P An example: .IP +.br +# iscsi-scstd command-line options. See also man iscsi-scstd. +.br +ISCSID_OPTIONS="-u0 -g0 -p3260" +.br + +.br # When using the procfs interface, the /etc/init.d/scst script .br # cannot derive from /etc/scst.conf which target modules will @@ -35,4 +51,4 @@ SCST_TARGET_MODULES="scst_local iscsi_scst ib_srpt" Configuration file that controls the behavior of some aspects of /etc/init.d/scst. .SH "SEE ALSO" -scstadmin(1), scst.conf(5) +scstadmin(1), scst.conf(5), iscsi-scstd(8)