commit:     aacb74f137b5f2dd6f9a0edeef3fa1dcd80897c7
Author:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  1 16:51:13 2021 +0000
Commit:     罗百科 <patrick <AT> gentoo <DOT> org>
CommitDate: Mon Mar  1 16:52:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aacb74f1

sys-fabric/opensm: Fix init script

Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>

 sys-fabric/opensm/files/opensm.init.d.2            | 22 ++++++++++++++++++++++
 ...pensm-3.3.23.ebuild => opensm-3.3.23-r1.ebuild} |  2 +-
 2 files changed, 23 insertions(+), 1 deletion(-)

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 00000000000..238449cb3f4
--- /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
similarity index 96%
rename from sys-fabric/opensm/opensm-3.3.23.ebuild
rename to sys-fabric/opensm/opensm-3.3.23-r1.ebuild
index ffcf8f39bf1..12fc2994bc5 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

Reply via email to