scst initialization: Remove kernel module parameters from /etc/default/scst

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3931 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2011-11-17 17:52:29 +00:00
parent 20f64c4e7e
commit 3749844c5f
4 changed files with 21 additions and 27 deletions
-5
View File
@@ -1,8 +1,3 @@
# SCST kernel module parameters
#
# An example for ib_srpt:
# ib_srpt_parameters="srp_max_req_size=4200"
# 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"
+2 -10
View File
@@ -197,20 +197,12 @@ start_scst() {
done
for m in $SCST_MODULES; do
module_params="`set | sed -n -e "s/^${m}_parameters='\(.*\)'$/\1/p"\
-e "s/^${m}_parameters=\(.*\)$/\1/p"`"
if [ ! -e /sys/module/$m ]; then
if ! modprobe $m $module_params; then
echo modprobe $m $module_params failed.
if ! modprobe $m; then
echo modprobe $m failed.
unload_scst
return 5
fi
else
for pv in $module_params; do
echo $pv | sed 's/=/ /' \
| { read param value;
echo "$value" >/sys/module/$m/parameters/$param; }
done
fi
done
+12 -11
View File
@@ -7,10 +7,9 @@
scst \- /etc/init.d/scst configuration file.
.SH DESCRIPTION
/etc/default/scst is a configuration file read by the SCST startup script
/etc/init.d/scst and that controls the behavior of that startup script. This
file contains zero or more lists of kernel module parameters that are passed
by the /etc/init.d/scst script to the appropriate kernel module when such a
kernel module is loaded.
/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.
.P
The format of the
.I scst
@@ -19,19 +18,21 @@ file is as follows:
- Blank lines and lines starting with a hash sign (#) are ignored.
.br
- All other lines must contain a variable definition using the syntax
<target_driver>_parameters=<value>. If <value> contains blanks, it must be
surrounded with double quotes. <target_driver> is the name of an SCST target
driver kernel module.
<name>=<value>. If <value> contains blanks, it must be
surrounded with double quotes.
.P
An example:
.IP
# Set the ib_srpt kernel module parameter srp_max_req_size to
# When using the procfs interface, the /etc/init.d/scst script
.br
# 4200 bytes and the srpt_sq_size parameter to 2048 elements.
# cannot derive from /etc/scst.conf which target modules will
.br
ib_srpt_parameters="srp_max_req_size=4200 srpt_sq_size=2048"
# be used and hence these have to be specified explicitly.
.br
SCST_TARGET_MODULES="scst_local iscsi_scst ib_srpt"
.SH FILES
.IP /etc/default/scst
Configuration file interpret and applied by /etc/init.d/scst.
Configuration file that controls the behavior of some aspects of
/etc/init.d/scst.
.SH "SEE ALSO"
scstadmin(1), scst.conf(5)
+7 -1
View File
@@ -326,9 +326,15 @@ DEVICE_GROUP dgroup2 {
}
.br
}
.SH KERNEL MODULE PARAMETERS
Some SCST settings cannot be configured via scst.conf but only as a kernel
module parameter. Parameters for an SCST kernel module can be configured in
/etc/modprobe.d/99-local.conf just like for any other kernel module. An example:
.IP
options ib_srpt use_node_guid_in_target_name=1
.SH FILES
.IP "/etc/scst.conf"
The configuration file read by
.BR scstadmin (1).
.SH "SEE ALSO"
scstadmin(1), scst(5)
scstadmin(1), scst(5), modprobe.d(5)