initial import
This commit is contained in:
27
irqbalance/irqbalance.initd
Normal file
27
irqbalance/irqbalance.initd
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
after bootmisc
|
||||
}
|
||||
|
||||
command="/usr/sbin/irqbalance"
|
||||
command_args="${IRQBALANCE_OPTS}"
|
||||
|
||||
check_sysfs() {
|
||||
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
|
||||
}
|
||||
|
||||
start() {
|
||||
check_sysfs || return 1
|
||||
ebegin "Starting irqbalance"
|
||||
start-stop-daemon --exec ${command} --start -- ${IRQBALANCE_OPTS}
|
||||
eend $?
|
||||
}
|
||||
Reference in New Issue
Block a user