summaryrefslogtreecommitdiffstats
path: root/testing/targetcli/targetcli.initd
blob: 8527c8476d2c1399a779aad365eb0c5eb691c2e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/sbin/runscript

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 $?
}