aboutsummaryrefslogblamecommitdiffstats
path: root/community/targetcli/targetcli.initd
blob: 589d61d1a8c5c720532a8a26c2475191cf824812 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                  










                                                                                 
                               

                             
                                                 









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