summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-05-03 13:42:55 +0100
committerSam James <sam@gentoo.org>2024-05-03 13:43:05 +0100
commita9c2ee5f7cd89b3bb5c8a409b114ebc21cda0ce7 (patch)
tree7023ef3ebcb51c19d8c0409c113c7ae8792abefa /sys-apps
parentdev-python/zconfig: add 4.1 (diff)
downloadgentoo-a9c2ee5f7cd89b3bb5c8a409b114ebc21cda0ce7.tar.gz
gentoo-a9c2ee5f7cd89b3bb5c8a409b114ebc21cda0ce7.tar.bz2
gentoo-a9c2ee5f7cd89b3bb5c8a409b114ebc21cda0ce7.zip
sys-apps/irqbalance: fix path in init script
Closes: https://bugs.gentoo.org/931133 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/irqbalance/files/irqbalance.init.522
-rw-r--r--sys-apps/irqbalance/irqbalance-1.9.4-r1.ebuild (renamed from sys-apps/irqbalance/irqbalance-1.9.4.ebuild)2
2 files changed, 23 insertions, 1 deletions
diff --git a/sys-apps/irqbalance/files/irqbalance.init.5 b/sys-apps/irqbalance/files/irqbalance.init.5
new file mode 100644
index 000000000000..511e4fee023a
--- /dev/null
+++ b/sys-apps/irqbalance/files/irqbalance.init.5
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+command="/usr/bin/irqbalance"
+command_args="${IRQBALANCE_OPTS}"
+
+start_pre() {
+ if grep -q MSI /proc/interrupts 2>/dev/null && \
+ test -z "$(find /sys/devices -type d -name msi_irqs 2>/dev/null)"; then
+ eerror "MSI interrupts found in /proc/interrupts but none found in sysfs."
+ eerror "You need to update your kernel."
+ return 1
+ fi
+
+ checkpath -q -d /run/${SVCNAME}
+}
diff --git a/sys-apps/irqbalance/irqbalance-1.9.4.ebuild b/sys-apps/irqbalance/irqbalance-1.9.4-r1.ebuild
index d15ff251b576..ba4b5355945e 100644
--- a/sys-apps/irqbalance/irqbalance-1.9.4.ebuild
+++ b/sys-apps/irqbalance/irqbalance-1.9.4-r1.ebuild
@@ -64,7 +64,7 @@ src_configure() {
src_install() {
meson_src_install
- newinitd "${FILESDIR}"/irqbalance.init.4 irqbalance
+ newinitd "${FILESDIR}"/irqbalance.init.5 irqbalance
newconfd "${FILESDIR}"/irqbalance.confd-2 irqbalance
systemd_dounit "${WORKDIR}"/${P}/misc/irqbalance.service
udev_dorules "${WORKDIR}"/${P}/misc/90-irqbalance.rules