summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2020-10-24 14:37:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2020-10-24 15:12:00 -0700
commit436e19902cf8f23717c3605903248dcb273b890e (patch)
tree6ccc7959c9ff75e645d86e73bc991e0d9231d4e8 /sys-apps/ipmitool/files
parentsci-libs/trilinos: version bump to 13.0.0 (diff)
downloadgentoo-436e19902cf8f23717c3605903248dcb273b890e.tar.gz
gentoo-436e19902cf8f23717c3605903248dcb273b890e.tar.bz2
gentoo-436e19902cf8f23717c3605903248dcb273b890e.zip
sys-apps/ipmitool: cleanup init & add contrib tools
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'sys-apps/ipmitool/files')
-rw-r--r--sys-apps/ipmitool/files/exchange-bmc-os-info-1.8.18.initd23
-rw-r--r--sys-apps/ipmitool/files/ipmitool-1.8.18-ipmievd.confd27
-rw-r--r--sys-apps/ipmitool/files/ipmitool-1.8.18-ipmievd.initd28
-rw-r--r--sys-apps/ipmitool/files/log_bmc-1.8.18.initd25
4 files changed, 103 insertions, 0 deletions
diff --git a/sys-apps/ipmitool/files/exchange-bmc-os-info-1.8.18.initd b/sys-apps/ipmitool/files/exchange-bmc-os-info-1.8.18.initd
new file mode 100644
index 000000000000..9c63983f21f3
--- /dev/null
+++ b/sys-apps/ipmitool/files/exchange-bmc-os-info-1.8.18.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# /etc/init.d/exchange-bmc-os-info
+
+name="exchange-bmc-os-info"
+description="Exchange Information between BMC and OS"
+command=/usr/libexec/exchange-bmc-os-info
+command_args=""
+: "${DEVICENUM:=0}" # which BMC
+required_files=/dev/ipmi${DEVICENUM}
+
+depend() {
+ use hostname modules
+ keyword -docker -lxc -prefix -systemd-nspawn
+}
+
+start() {
+ "${command}" start
+}
+stop() {
+ "${command}" stop
+}
diff --git a/sys-apps/ipmitool/files/ipmitool-1.8.18-ipmievd.confd b/sys-apps/ipmitool/files/ipmitool-1.8.18-ipmievd.confd
new file mode 100644
index 000000000000..b860c23c7f89
--- /dev/null
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.18-ipmievd.confd
@@ -0,0 +1,27 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# /etc/conf.d/ipmievd
+
+# Interfaces:
+# open Linux OpenIPMI Interface
+# imb Intel IMB Interface
+# bmc IPMI v2.0 BMC interface
+# lan IPMI v1.5 LAN Interface
+# lanplus IPMI v2.0 RMCP+ LAN Interface
+
+INTERFACE="open"
+
+# Commands:
+# open Use OpenIPMI for asyncronous notification of events
+# sel Poll SEL for notification of events
+#
+# 'pidfile=...' will be appended!
+COMMAND="open daemon"
+
+# Options.
+
+OPTIONS=""
+
+# Device number:
+# Used to target a specific BMC on a multi-node, multi-BMC system via the open interface
+DEVICENUM=0
diff --git a/sys-apps/ipmitool/files/ipmitool-1.8.18-ipmievd.initd b/sys-apps/ipmitool/files/ipmitool-1.8.18-ipmievd.initd
new file mode 100644
index 000000000000..e8ef2c39d454
--- /dev/null
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.18-ipmievd.initd
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# /etc/init.d/ipmievd
+
+depend() {
+ use logger modules
+ keyword -docker -lxc -prefix -systemd-nspawn
+}
+
+# TODO: ipmievd has a mode where it could be used to monitor multiple BMCs via
+# DEVICENUM or remote systems, and it would be valid to run multiple instances.
+# That is not supported by this init script at this time.
+
+description="IPMI event daemon for sending events to syslog LOCAL4"
+
+: "${DEVICENUM:=0}"
+: "${INTERFACE:=open}"
+: "${COMMAND:=open daemon}"
+: "${OPTIONS:=}"
+
+daemon=ipmievd
+
+pidfile=/run/${daemon}.pid${DEVICENUM} # see manpage re suffix
+command=/usr/sbin/${daemon}
+cachefile=/run/${daemon}.${DEVICENUM}.sdr-cache
+command_args="-d ${DEVICENUM} -S ${cachefile} -I ${INTERFACE} ${OPTIONS} ${COMMAND} pidfile=${pidfile}"
+required_files=/dev/ipmi$DEVICENUM
diff --git a/sys-apps/ipmitool/files/log_bmc-1.8.18.initd b/sys-apps/ipmitool/files/log_bmc-1.8.18.initd
new file mode 100644
index 000000000000..4064edf3b84d
--- /dev/null
+++ b/sys-apps/ipmitool/files/log_bmc-1.8.18.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="log_bmc"
+description="Add SEL entries to indicate OS Boot status"
+command=/usr/libexec/log_bmc.sh
+command_args=""
+: "${DEVICENUM:=0}" # which BMC
+required_files=/dev/ipmi${DEVICENUM}
+
+depend() {
+ use modules
+ after ipmievd # to capture our own log event
+ keyword -docker -lxc -prefix -systemd-nspawn
+}
+
+start() {
+ # TODO: should this keep start so it only fires once per boot?
+ "${command}" os_boot
+}
+
+stop() {
+ "${command}" os_shutdown
+}