aports/community/targetcli/targetcli.initd
2015-11-10 07:56:41 +00:00

27 lines
476 B
Plaintext
Executable File

#!/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 $?
}