Commit Graph
229 Commits
Author SHA1 Message Date
Bart Van Assche bad6359752 scstadmin: Fix copy/paste bugs in the error messages in initiators() and luns().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3699 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-20 16:39:12 +00:00
Bart Van Assche 573ab14fe1 scstadmin: Unify the code for enumerating all SCST devices and the code for enumerating all SCST devices associated with a specific device handler
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3697 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-20 14:47:45 +00:00
Bart Van Assche a66cbc4115 scstadmin: Add support for the sysfs interface provided by the code on the sysfs-tree-changes branch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3696 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-20 12:47:04 +00:00
Bart Van Assche 158182310c scstadmin: Add local variables for emacs
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3694 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-20 06:54:59 +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 b635ddf133 Whitespace-ony changes: use tab to indent and remove trailing whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3692 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-19 16:10:11 +00:00
Bart Van Assche 6640a95b54 scstadmin: Fix handlers(), the subroutine that scans for loaded device handlers
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3691 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-19 15:39:39 +00:00
Bart Van Assche 8fd3c8dcac scstadmin: Make clear that the initiator group argument is optional for the LUN manipulation commands.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3687 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-18 11:54:02 +00:00
Bart Van Assche 6b84c4cfdb scstadmin: Change help text wording.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3686 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-18 10:37:31 +00:00
Bart Van Assche 8d652ce151 scstadmin: When adding a target attribute, report that a target attribute is being added instead of a driver attribute.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3685 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-18 10:00:13 +00:00
Bart Van Assche 5346d1cfd9 scstadmin: Should have been included in r3683.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3684 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-18 09:13:12 +00:00
Bart Van Assche 3ea5e2d4e5 scstadmin: Partially revert r3678. Checking whether a group name has been specified is the responsability of the Perl command line parser.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3683 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-18 08:56:06 +00:00
Bart Van Assche d57423be9a scstadmin: Make -write_config write out initiator names in alphabetical order
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3682 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-18 07:54:12 +00:00
Bart Van Assche bdba6df123 scstadmin: Only show usage information if -h or -help has been specified. Do not try to execute the specified command if there is a syntax error in the command line arguments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3681 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-18 07:49:05 +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 c972696b3b scstadmin: Make clear that -group is optional for -set_lun_attr.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3679 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-17 14:07:18 +00:00
Bart Van Assche f3b7c16dff scstadmin: Add information about -list_grp_attr in the scstadmin help text. Also, complain if no group name has been specified for -list_grp_attr.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3678 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-17 13:54:28 +00:00
Bart Van Assche 12be13f881 scstadmin: Add missing comma in an error message
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3677 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-17 13:30:14 +00:00
Bart Van Assche 02405d17f6 scstadmin: Fix documentation of -list_lun_attr and also the error message printed if -driver or -target is missing for -list_lun_attr.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3676 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-17 13:20:59 +00:00
Bart Van Assche 0fec18302a scstadmin -list_drv_attr: Do not print the error message "No such driver found" for target drivers without attributes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3675 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-17 13:10:39 +00:00
Bart Van Assche fd96524a64 scstadmin: Fix a documentation inconsistency
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3674 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-17 11:34:09 +00:00
Bart Van Assche 30540fd289 scstadmin: Add command-line options -h and --help
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3653 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-03 09:36:33 +00:00
Bart Van Assche 4f9a54f694 Send scstadmin help text to stdout instead of stderr such that it is easier to pipe to less
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3652 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-02 12:30:34 +00:00
Bart Van Assche d48497f4d3 scstadmin: Whitespace fixes for the -write_config changes introduced in r3606.
Separate device handler key and non-key attributes with a single blank line
instead of two. Indent <target>.<lun>.<attribute> with three tabs instead
of four.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3646 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-30 18:40:29 +00:00
Bart Van Assche 0c0cf3215b scstadmin: Multiple -write_config bug fixes.
Bug fixes:
- Do not write out the line "# Non-key attributes" for the top level if -nonkey
  has not been specified.
- If -nonkey has been specified, write out the device handler creation time
  attributes too (blocksize, o_direct, read_only, removable, ...).
- If -nonkey has been specified, write out the LUN creation time attributes
  too (read_only).

Also, simplify the -write_config implementation by introducing the Perl
subroutines serializeKeyAttr() and serializeNkAttr().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3606 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-22 19:18:39 +00:00
Bart Van Assche f9488e7083 scstadmin: Minor source code simplification
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3600 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 18:43:31 +00:00
Bart Van Assche 08b55c2ce9 scstadmin: Another return value consistency improvement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3599 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 17:30:41 +00:00
Bart Van Assche 5d77498e7a scstadmin: Use 1 instead of TRUE where an integer exit code is returned
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3598 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 16:58:29 +00:00
Bart Van Assche 990d1aae3c scstadmin: Escape a single quote in order not to confuse syntax highlighting editors
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3597 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 16:39:52 +00:00
Bart Van Assche 6719d96059 scstadmin: Fix a typo
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3596 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 16:38:53 +00:00
Bart Van Assche d2f4998270 scstadmin(sysfs): Make writing top-level non-key attributes work. Do not indent these attributes.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3593 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 06:21:49 +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
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