diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2015-11-10 07:50:56 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2015-11-10 07:56:41 +0000 |
commit | 60bfe8bdd62bdd3a73d493e2987f80af53f84c7a (patch) | |
tree | bace6645741461d621f4aac0c74bcf5bc3c685d9 /community/targetcli/targetcli.initd | |
parent | 37aedc59cedd5be745c79064f9a07fa897c4a8f7 (diff) | |
download | aports-60bfe8bdd62bdd3a73d493e2987f80af53f84c7a.tar.bz2 aports-60bfe8bdd62bdd3a73d493e2987f80af53f84c7a.tar.xz |
community/targetcli: moved from main
Diffstat (limited to 'community/targetcli/targetcli.initd')
-rwxr-xr-x | community/targetcli/targetcli.initd | 26 |
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 $? +} |