summaryrefslogtreecommitdiff
path: root/sys-apps/edac-utils/files
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/edac-utils/files')
-rw-r--r--sys-apps/edac-utils/files/edac.init16
-rw-r--r--sys-apps/edac-utils/files/edac.service11
2 files changed, 27 insertions, 0 deletions
diff --git a/sys-apps/edac-utils/files/edac.init b/sys-apps/edac-utils/files/edac.init
new file mode 100644
index 000000000000..23318b37e10c
--- /dev/null
+++ b/sys-apps/edac-utils/files/edac.init
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+command=/usr/bin/edac-ctl
+
+start() {
+ ebegin "Registering edac-utils labels"
+ /usr/sbin/edac-ctl --register-labels
+ eend $?
+}
+
+stop() {
+ ebegin "Unregistering edac-utils labels"
+ /usr/sbin/edac-ctl --unload
+ eend $?
+}
diff --git a/sys-apps/edac-utils/files/edac.service b/sys-apps/edac-utils/files/edac.service
new file mode 100644
index 000000000000..b94a4b6b5443
--- /dev/null
+++ b/sys-apps/edac-utils/files/edac.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Initialize EDAC Drivers For Machine Hardware
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/edac-ctl --register-labels
+ExecStop=/usr/sbin/edac-ctl --unload
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target