summaryrefslogtreecommitdiff
path: root/sys-apps/ipmitool/files
diff options
context:
space:
mode:
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/ipmievd.service10
-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
5 files changed, 113 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/ipmievd.service b/sys-apps/ipmitool/files/ipmievd.service
new file mode 100644
index 000000000000..fdae14f231ce
--- /dev/null
+++ b/sys-apps/ipmitool/files/ipmievd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=IPMI event daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/ipmievd open daemon
+
+[Install]
+WantedBy=multi-user.target
+Alias=ipmi.service
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
+}