diff options
Diffstat (limited to 'testing/targetcli/targetcli.initd')
| -rwxr-xr-x | testing/targetcli/targetcli.initd | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/targetcli/targetcli.initd b/testing/targetcli/targetcli.initd new file mode 100755 index 0000000000..3dbbb9ec53 --- /dev/null +++ b/testing/targetcli/targetcli.initd @@ -0,0 +1,27 @@ +#!/sbin/runscript + +description="Administration tool for managing RisingTide Systems storage targets" +command="/usr/bin/targetcli" +modules="target_core_mod iscsi_target_mod" + +depend() { + need net + after firewall +} + +start() { + ebegin "Starting ${RC_SVCNAME}" + mount -t configfs none /sys/kernel/config + for mod in modules; do + modprobe $mod + done + $command restoreconfig clear_existing=true + eend $? +} + +stop() { + ebegin "Stopping ${RC_SVCNAME}" + $command clearconfig confirm=true + umount /sys/kernel/config + eend $? +} |
