Commit Graph

198 Commits

Author SHA1 Message Date
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
Bart Van Assche
2debac5ced Slackware: Do not suggest the user to run a script to activate /etc/init.d/scst on boot because such a script does not exist on Slackware.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3566 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-10 18:03:06 +00:00
Bart Van Assche
f0336fced9 Follow-up for r3564: add sample /etc/default/scst file
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3565 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-10 17:56:56 +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
285d4bedcc scstadmin: fixed bug in "make uninstall" - specify proper directory when uninstalling scstadmin.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3491 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-28 15:59:16 +00:00
Bart Van Assche
cefaa38fae scstadmin/Makefile robustness improvements for the "install" target
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3480 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-26 18:26:41 +00:00
Bart Van Assche
f82565d129 scstadmin/Makefile: verify whether the Perl module ExtUtils::MakeMaker has been installed before trying to install scstadmin itself. Based on a suggestion by Hiroyuki Sato.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3456 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-16 18:25:33 +00:00
Mark Buechler
b41b5b2f65 - Fix a small typo.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3455 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-13 19:21:16 +00:00
Mark Buechler
ccbc2e6400 - Add LUN 0 warning.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3454 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-13 19:05:56 +00:00
Mark Buechler
1ee4416700 - Enable all hardware targets before adding virtual ones.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3443 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-09 20:03:07 +00:00
Vladislav Bolkhovitin
f518cd150c Let's remove *.orig and *.rej files on extraclean
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3277 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-03-10 20:07:23 +00:00
Bart Van Assche
7325753fda Avoid that make disable_proc/enable_proc triggers a warning about the soft link scstadmin not being found.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3236 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-29 10:31:23 +00:00
Mark Buechler
229f8cff60 - Expose -set_grp_attr argument in help output.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3202 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-07 15:38:51 +00:00
Bart Van Assche
579a155d90 Make -write_config write device names in alphabetical order.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3199 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-06 18:31:58 +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
Vladislav Bolkhovitin
42ceeef996 Update docs to make former README.sysfs default README
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3174 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-21 18:08:52 +00:00
Vladislav Bolkhovitin
95344e3368 Rename README.sysfs to README
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3173 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-21 18:03:47 +00:00
Vladislav Bolkhovitin
f2bdf9f8ec Rename README to README.procfs
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3172 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-21 18:03:04 +00:00
Mark Buechler
f55ccbe2cd - Small cleanup of issueLip().
- Issue a LIP on any changes which might effect initiators.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3011 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-10 16:08:52 +00:00
Mark Buechler
8f8dffd91b - Exit 0 and issue warning on empty config file.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2979 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-08 15:01:48 +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
faa2e13cb6 - Properly detect when SCST isn't loaded.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2969 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-07 17:49:15 +00:00
Mark Buechler
42e623f994 - Hopefully fix all remaining exit code issues.
- Better fix for empty groups - don't write empty braces.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2968 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-07 17:40:16 +00:00
Bart Van Assche
4afc6e1713 Fixed a bug that could cause scstadmin -write_config to generate an invalid
configuration file, e.g.
...
               GROUP a         }
...

Reported-by: Frank Zago <fzago@systemfabricworks.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2952 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-07 09:35:18 +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
988147c48b - Apply target attributes before assigning LUNs.
- Always enable/disable targets and drivers last.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2710 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-15 15:55:39 +00:00
Mark Buechler
3705114629 - Return 0 from applyConfiguration() so scstadmin can exit 0 on success.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2698 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-14 03:04:45 +00:00
Mark Buechler
a2dc603642 - Differentiate between hardware and virtual targets within the config file when using mixed type drivers.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2407 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-14 14:39:12 +00:00
Mark Buechler
961f45ee92 - Fix virtual targets for drivers which also support hardware targets.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2392 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-11 16:24:51 +00:00
Mark Buechler
c0122edea4 - Fix some -write_config formatting. Probably more to come.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2321 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-30 20:24:21 +00:00
Mark Buechler
11008f0f98 - Write group attributes on -write_config.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2315 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-30 16:57:31 +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
5425237908 - Last commit should have been 'Disable driver on clear_config'. Remove debugging code.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2256 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-24 20:16:32 +00:00
Mark Buechler
dcd3ebb285 - Disable targets on -clear_config.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2255 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-24 20:13:31 +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
Mark Buechler
a75f4f934c - Disable targets on -clear_config.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2242 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-24 15:49:59 +00:00
Mark Buechler
6522a519fd - Small typo fix.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2241 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-24 15:37:20 +00:00
Mark Buechler
5b9c8b0399 - Don't attempt to read write-only attributes within sessions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2240 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-24 15:30:16 +00:00
Mark Buechler
a2e1e877cf - Better fix for removing virtual targets.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2239 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-24 15:15:57 +00:00
Mark Buechler
9e1fbc199f - Fix removing virtual targets.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2238 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-24 15:07:56 +00:00
Mark Buechler
9d561a8b61 - Add scst_local configuration example for sysfs.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2222 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-23 18:55:20 +00:00
Mark Buechler
528d2d0c4c - Fix some minor error reporting issues.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2220 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-23 18:52:23 +00:00
Mark Buechler
7063e142bb - Add some more output as to what scstadmin is doing as well as better format it.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2217 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-23 18:40:28 +00:00
Mark Buechler
f5ea132ec3 - Update ChangeLog for 2.0.0 release.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2213 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-23 16:31:05 +00:00
Mark Buechler
2ab16bc1cd - Remove reference to scst_db in README.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2211 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-23 16:25:08 +00:00
Mark Buechler
3a8d70b166 - Remove old scst_db stuff which no longer works with even procfs.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2210 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-23 16:22:51 +00:00
Mark Buechler
11608eb7b3 - Remove invalid example file for older scstadmin using MySQL.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2207 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-23 16:20:19 +00:00