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