57 Commits

Author SHA1 Message Date
Bart Van Assche
8042466117 scstadmin/init.d/scst: Remove the 'which' invocation
Remove the invocation of the 'which' command since that command has been
deprecated in Debian 11 and since I am not aware of any other portable
approach for querying the path of a command.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9494 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-27 17:56:28 +00:00
Bart Van Assche
c7788ee7ac /etc/init.d/scst: Unload target modules first
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9046 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-12 23:31:34 +00:00
Bart Van Assche
2239719d8e /etc/init.d/scst: Really unload all SCST kernel modules
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8952 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 16:49:19 +00:00
Bart Van Assche
00765d8ae2 /etc/init.d/scst: Unload all SCST kernel modules
Also unload SCST kernel modules that have been loaded manually or that are
no longer referenced by /etc/scst.conf.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8951 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 16:30:42 +00:00
Bart Van Assche
9be823075d /etc/init.d/scst: Fix a shellcheck warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 16:18:13 +00:00
Bart Van Assche
5b1a15d3c9 scstadmin/init.d/scst: Simplify sed expressions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8882 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-09 22:46:59 +00:00
Bart Van Assche
17a0091804 scstadmin/init.d/scst: Fix shellcheck warnings
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8881 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-09 22:46:02 +00:00
Bart Van Assche
976595dccb scst: Also unload the qla2xxx_scst kernel module when stopping SCST
Make sure that the qla2xxx_scst kernel module is reloaded after an upgrade
of SCST. 


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8161 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-06 23:14:24 +00:00
Bart Van Assche
73dca5af22 Remove trailing whitespace from documentation files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7516 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 21:57:13 +00:00
Bart Van Assche
d41a3a3cc9 /etc/init.d/scst: Make this script work on recent versions of Ubuntu Linux
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6919 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-26 17:26:17 +00:00
Vladislav Bolkhovitin
55bb0206cd scst: when checking the status of the service, also check if all daemons are running
Signed-off-by: Erez Zilber <erezzi.list@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6906 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-06-30 04:10:38 +00:00
Bart Van Assche
0f3bcea86d scstadmin: Improve copy manager support
Add support for saving and restoring copy manager attributes.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6709 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-21 00:19:04 +00:00
Bart Van Assche
2f455b29d1 /etc/init.d/scst: Suppress rmmod error messages
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6708 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-20 23:23:48 +00:00
Bart Van Assche
06ef46415c /etc/init.d/scst: Suppress an error message if iscsi-scstd is not installed
Avoid that the following error message is printed when stopping
or starting SCST if iscsi-scstd has not been installed:

# /sbin/service scst restart
which: no iscsi-scstd in
(/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin)
Restarting SCST

Signed-off-by: Hiroyuki Sato <hiroysato@gmail.com>
[bvanassche: Eliminated ISCSI_DAEMON variable]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6436 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-29 17:20:43 +00:00
Bart Van Assche
14c82f892d /etc/init.d/scst: Fix stopping SCST with iSER loaded
Commit r6420 broke scst unloading, since isert_scst must be
unloaded before iscsi_scst.

Additionally, fix another possible cause of failing to unload
isert_scst. With iSER (RDMA CM to be exact) it may take up to
about 50 seconds to receive disconnected event if the remote end
is for some reason unreachable, e.g. becauase of a cable problem
or power loss/forced reboot on initiator side. This is due to MAD
send timeout.

Signed-off-by: Yan Burman <yanb@mellanox.com>
[bvanassche: modified this patch such that it uses unload_kmod()]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6432 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-28 15:28:59 +00:00
Bart Van Assche
2715178d01 /etc/init.d/scst: Introduce function unload_kmod()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6429 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-27 16:10:36 +00:00
Bart Van Assche
8f49cd43bc /etc/init.d/scst: Avoid that starting SCST fails with CONFIG_INFINIBAND=n
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6420 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-14 18:26:38 +00:00
Bart Van Assche
6aaeca1cd9 Merge iser branch r6234 into trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6235 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-10 15:35:26 +00:00
Bart Van Assche
0717d99a62 /etc/init.d/scst: Exit with status code 0 upon 'start' if already running
Reported-by: Dimitar Tanev <dimitar@linuxdevgroup.org>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5912 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-04 12:19:56 +00:00
Bart Van Assche
cde37a8e3c /etc/init.d/scst: Make this script independent of the installation directory (/usr/local versus /usr)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5128 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-19 17:01:36 +00:00
Bart Van Assche
82fcc41287 /etc/init.d/scst: Change one tab into a space
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4686 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-06 09:32:40 +00:00
Bart Van Assche
97e8aa1f08 /etc/init.d/scst: Introduce character classes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4685 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-06 09:32:00 +00:00
Bart Van Assche
88376b1577 /etc/init.d/scst: Revert r4151 and hence restore r4023 since this setting is needed again for openSUSE 12.2 systems
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4684 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-06 09:14:39 +00:00
Bart Van Assche
37431aae60 /etc/init.d/scst: Wait up to 30s before giving up trying to unload a kernel module
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4608 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-08 14:23:13 +00:00
Bart Van Assche
1a0b957efc /etc/init.d/scst: When parsing /etc/scst.conf for "TARGET_DRIVER ... {", accept blanks at the end of the line.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4259 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-01 18:17:24 +00:00
Bart Van Assche
81fff819d6 scstadmin: Make /etc/init.d/scst status work on RHEL 6.2. Apparently RHEL 6.2 doesn't define the function rc_status in /lib/lsb/init-functions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4163 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-18 12:05:45 +00:00
Bart Van Assche
3da8048c71 scstadmin: Only enable /etc/init.d/scst in runlevels 3 and 5 since networking is not available in runlevels 2 or 4
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4152 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-04 14:16:51 +00:00
Bart Van Assche
02b431ec24 scstadmin: Revert r4023 since bug https://bugzilla.novell.com/show_bug.cgi?id=738281 has been fixed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4151 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-04 14:13:52 +00:00
Bart Van Assche
372373cf5f 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
2012-01-12 17:36:49 +00:00
Bart Van Assche
a7d2282fd0 Make "/etc/init.d/scst status" exit with code 3 instead of 0 if SCST has not been started, as required by the LSB. Fixes a bug introduced in r3805.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4047 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-02 12:08:33 +00:00
Vladislav Bolkhovitin
6d8ca195f7 openSUSE 12.1 automatically transforms commands like
"/etc/init.d/scst start" into a systemd start command. Since that doesn't
work for the SCST init script, disable systemd wrapping.

See also bug #738281 "Upgrading from openSUSE 11.4 to openSUSE 12.1 breaks third-party
LSB-compliant System V style init scripts" in the Novell bugzilla database
(https://bugzilla.novell.com/show_bug.cgi?id=738281).

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4023 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-21 03:02:13 +00:00
Bart Van Assche
c8fc2dd821 /etc/init.d/scst: clarify comments
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3996 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 13:03:51 +00:00
Bart Van Assche
3749844c5f 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
2011-11-17 17:52:29 +00:00
Bart Van Assche
706407c334 /etc/init.d/scst: Let "scst start" proceed even if the config file is missing
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3827 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-08-22 19:09:59 +00:00
Bart Van Assche
24fc29b9d6 Follow-up for r3816: make sure that /etc/init.d/scst restart works again
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3826 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-08-21 08:21:31 +00:00
Bart Van Assche
34714117d1 /etc/init.d/scst, Gentoo: do not require that /etc/scst.conf exists when starting SCST. Makes the init script behavior on Gentoo consistent with LSB-compliant distributions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3816 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-08-17 08:27:18 +00:00
Bart Van Assche
0042639266 /etc/init.d/scst: Port to Gentoo
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3805 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-08-14 16:13:33 +00:00
Bart Van Assche
be2a156d3d /etc/init.d/scst: Replace another instance of "echo y | scstadmin" by "scstadmin -noprompt".
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3693 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-19 19:06:02 +00:00
Bart Van Assche
a2186fddc0 /etc/init.d/scst: Use the -noprompt option of scstadmin instead of "echo y |".
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3680 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-18 07:46:17 +00:00
Bart Van Assche
562809a2da /etc/init.d/scst: Improved /etc/scst.conf parsing robustness for manually edited scst.conf files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3569 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-11 15:55:49 +00:00
Bart Van Assche
aa199d8ef6 /etc/init.d/scst: Relax parsing of /etc/scst.conf. Accept sequences of blanks and tabs instead of only spaces when looking for device handler and target driver names.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3568 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-11 10:26:25 +00:00
Bart Van Assche
4ce84f3edb More /etc/init.d/scst tuning:
- Works now if the SCST modules have been compiled into the kernel (=Y) instead of being compiled as modules (=M).
- Rename DAEMONS into SCST_DAEMONS.
- Use the same name for loading and removing the iSCSI kernel module (iscsi_scst).
- Set the path after having read /lib/lsb/init-functions instead of before.
- Remove the path from the killall command.
- When parsing /etc/default/scst, handle both parameters with and without embedded spaces correctly.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3567 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-10 18:03:11 +00:00
Vladislav Bolkhovitin
7bde8810f5 Currently there are three different init scripts inside the SCST project:
scst, iscsi-scst and qla2x00t. This makes it unnecessary hard for users to
run several target drivers simultaneously. Additionally, several variants of
these init scripts exist for different distributions. This patch unifies all
these init scripts into a single init script. Additionally, some new features
have been added:
- Kernel module parameters can now be specified per kernel module in
  /etc/default/scst. An example:
 ib_srpt_parameters="thread=1 srp_max_req_size=4200"
- When using the sysfs interface, compute the kernel module list from scst.conf.
  Or, editing the SCST_MODULES variable is no longer necessary.
- When using the procfs interface, the SCST handler kernel module list is
  computed from /etc/scst.conf. The list of target driver kernel modules must
  now be configured in /etc/default/scst.

Other changes:
- scstadmin output is shown if scstadmin fails.
- Running make -C scstadmin install does no longer cause the scst script to
  be started at the next reboot - it is better to leave this as an explicit step.
- Made the error message generated if the lsb-core package has not yet been
  installed more clear.
- Use proper init script path on Slackware.
- make uninstall: run remove_initd under chroot if $(DESTDIR) is not empty.
- Fixed a bug in "make -C scstadmin uninstall": the path specified for removing
  /etc/init.d/scst was wrong.
- The command /etc/init.d/scst restart will only try to start SCST if stopping
  succeeded.
- Replaced "mkdir -m 755 -p $(DESTDIR)$(INITDIR)" by
  "install -d $(DESTDIR)$(INITDIR)" because of uniformity.

These changes have been tested on Ubuntu 11.04, Fedora 15, CentOS 5.6,
Scientific Linux 6.0, openSUSE 11.4, SLES11 SP1 and Slackware 13.37.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3564 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-10 02:38:04 +00:00
Bart Van Assche
5fe037e5b9 Updated my e-mail address in copyright statements and README files.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3175 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-21 18:48:14 +00:00
Mark Buechler
b12f90f23f - Fix init script for CentOS/RedHat. Patch by fzago@systemfabricworks.com
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2978 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-08 14:57:48 +00:00
Mark Buechler
6ce1ecf9d8 - Warn on missing /etc/scst.conf.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2736 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 14:56:37 +00:00
Mark Buechler
5e5478ecae - Permit init scripts to run and load modules even if /etc/scst.conf doesn't yet exist.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2735 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 14:51:57 +00:00
Mark Buechler
1c9d0cf043 - Fix init script for qla2x00t
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2259 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-24 20:27:46 +00:00
Mark Buechler
f519990ab2 - Add README.iscsi in init.d.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2243 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-24 17:11:31 +00:00
Vladislav Bolkhovitin
0c0a734968 A set of startup scripts for Gentoo customized by Scott R. Bowe <scottb@sentania.net>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1521 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-02-25 14:14:23 +00:00