aports/testing/targetcli/targetcli.initd

28 lines
517 B
Plaintext
Executable File

#!/sbin/runscript
description="Administration tool for managing RisingTide Systems storage targets"
command="/usr/bin/targetcli"
modules="target_core_mod iscsi_target_mod"
depend() {
need net
after firewall
}
start() {
ebegin "Starting ${RC_SVCNAME}"
mount -t configfs none /sys/kernel/config
for mod in modules; do
modprobe $mod
done
$command restoreconfig clear_existing=true
eend $?
}
stop() {
ebegin "Stopping ${RC_SVCNAME}"
$command clearconfig confirm=true
umount /sys/kernel/config
eend $?
}