mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 23:47:14 -08:00
31 lines
539 B
Plaintext
31 lines
539 B
Plaintext
#!/sbin/openrc-run
|
|
|
|
description="Administration tool for managing storage targets"
|
|
command="/usr/bin/targetcli"
|
|
|
|
depend() {
|
|
need dbus 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
|
|
ret=$?
|
|
if [ ${ret} -ne 0 ]; then
|
|
umount /sys/kernel/config
|
|
fi
|
|
eend ${ret}
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping ${RC_SVCNAME}"
|
|
${command} clearconfig confirm=true
|
|
umount /sys/kernel/config
|
|
eend $?
|
|
}
|