aboutsummaryrefslogtreecommitdiffstats
path: root/community/targetcli/targetcli.initd
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2015-11-10 07:50:56 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2015-11-10 07:56:41 +0000
commit60bfe8bdd62bdd3a73d493e2987f80af53f84c7a (patch)
treebace6645741461d621f4aac0c74bcf5bc3c685d9 /community/targetcli/targetcli.initd
parent37aedc59cedd5be745c79064f9a07fa897c4a8f7 (diff)
downloadaports-60bfe8bdd62bdd3a73d493e2987f80af53f84c7a.tar.bz2
aports-60bfe8bdd62bdd3a73d493e2987f80af53f84c7a.tar.xz
community/targetcli: moved from main
Diffstat (limited to 'community/targetcli/targetcli.initd')
-rwxr-xr-xcommunity/targetcli/targetcli.initd26
1 files changed, 26 insertions, 0 deletions
diff --git a/community/targetcli/targetcli.initd b/community/targetcli/targetcli.initd
new file mode 100755
index 0000000000..589d61d1a8
--- /dev/null
+++ b/community/targetcli/targetcli.initd
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+
+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 $?
+}