summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-fabric/opensm/files/opensm.init.d.222
-rw-r--r--sys-fabric/opensm/opensm-3.3.23-r1.ebuild (renamed from sys-fabric/opensm/opensm-3.3.23.ebuild)2
2 files changed, 23 insertions, 1 deletions
diff --git a/sys-fabric/opensm/files/opensm.init.d.2 b/sys-fabric/opensm/files/opensm.init.d.2
new file mode 100644
index 000000000000..238449cb3f40
--- /dev/null
+++ b/sys-fabric/opensm/files/opensm.init.d.2
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ after net # ip net seems to be needed to perform management.
+}
+
+prog=/usr/sbin/opensm
+
+start() {
+ ebegin "Starting OpenSM Infiniband Subnet Manager"
+ start-stop-daemon --start --background --exec $prog -- $OSM_OPTIONS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenSM Infiniband Subnet Manager"
+ start-stop-daemon --stop --exec $prog
+ eend $?
+}
+
diff --git a/sys-fabric/opensm/opensm-3.3.23.ebuild b/sys-fabric/opensm/opensm-3.3.23-r1.ebuild
index ffcf8f39bf14..12fc2994bc55 100644
--- a/sys-fabric/opensm/opensm-3.3.23.ebuild
+++ b/sys-fabric/opensm/opensm-3.3.23-r1.ebuild
@@ -38,7 +38,7 @@ src_configure() {
src_install() {
default
newconfd "${FILESDIR}/opensm.conf.d" opensm
- newinitd "${FILESDIR}/opensm.init.d" opensm
+ newinitd "${FILESDIR}/opensm.init.d.2" opensm
insinto /etc/logrotate.d
newins "${S}/scripts/opensm.logrotate" opensm
# we dont need this int script