summaryrefslogtreecommitdiffstats
path: root/main/targetcli/targetcli.initd
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2012-06-08 07:00:03 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2012-06-08 07:00:50 +0000
commite131099e4573847d287275384d23862b54a6e1c1 (patch)
tree67027f21696d70a0f2ba795d75427633a9c21ddf /main/targetcli/targetcli.initd
parent5162ef95ee5af5f8ebf91ec27e15264091042967 (diff)
downloadaports-e131099e4573847d287275384d23862b54a6e1c1.tar.bz2
aports-e131099e4573847d287275384d23862b54a6e1c1.tar.xz
testing/targetcli: move to main
Diffstat (limited to 'main/targetcli/targetcli.initd')
-rwxr-xr-xmain/targetcli/targetcli.initd26
1 files changed, 26 insertions, 0 deletions
diff --git a/main/targetcli/targetcli.initd b/main/targetcli/targetcli.initd
new file mode 100755
index 000000000..28f2f9b41
--- /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 $?
+}