summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shvetsov <alexxy@gentoo.org>2016-06-29 17:17:07 +0300
committerAlexey Shvetsov <alexxy@gentoo.org>2016-06-30 01:31:15 +0300
commit78687b7871a6d19ba23ac5da91c72d9732061bc1 (patch)
treebefa090ead56292b47a1607c1388583318fbbc3e /sys-fabric/srptools/files
parentgames-emulation/dosbox: sync live ebuild and make it copyable (diff)
downloadgentoo-78687b7871a6d19ba23ac5da91c72d9732061bc1.tar.gz
gentoo-78687b7871a6d19ba23ac5da91c72d9732061bc1.tar.bz2
gentoo-78687b7871a6d19ba23ac5da91c72d9732061bc1.zip
eclass/openib.eclass: Clean up ancient versions
Also move to sys-fabric category
Diffstat (limited to 'sys-fabric/srptools/files')
-rw-r--r--sys-fabric/srptools/files/srpd.initd42
1 files changed, 42 insertions, 0 deletions
diff --git a/sys-fabric/srptools/files/srpd.initd b/sys-fabric/srptools/files/srpd.initd
new file mode 100644
index 000000000000..d386df8396ac
--- /dev/null
+++ b/sys-fabric/srptools/files/srpd.initd
@@ -0,0 +1,42 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="SCSI RDMA Protoaemon daemon"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if ! modinfo ib_srp > /dev/null 2>&1 ; then
+ eerror "ib_srp module not found!"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig
+ ebegin "Loading ib_srp module"
+ modprobe ib_srp
+ eend $?
+ ebegin "Starting srp_daemon"
+ start-stop-daemon \
+ --start \
+ --background \
+ --make-pidfile \
+ --pidfile ${SRP_DAEMON_PID:-/var/run/srpd.pid} \
+ --exec /usr/sbin/srp_daemon -- ${SRP_DAEMON_OPTS:- -e -R 60}
+ eend $?
+
+}
+
+stop() {
+ ebegin "Stopping srp_daemon"
+ start-stop-daemon --stop --pidfile ${SRP_DAEMON_PID:-/var/run/srpd.pid}
+ eend $?
+ ebegin "Unloading ib_srp module"
+ rmmod ib_srp
+ eend $?
+}