auto-import irqbalance-1.12-1.1 on branch devel from
irqbalance-1.12-1.1.src.rpm
This commit is contained in:
parent
70e9e55afc
commit
fc413c7607
@ -0,0 +1 @@
|
||||
irqbalance-0.12.tar.gz
|
91
irqbalance.init
Executable file
91
irqbalance.init
Executable file
@ -0,0 +1,91 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# irqbalance Start/Stop irq balancing daemon
|
||||
#
|
||||
# chkconfig: 345 13 87
|
||||
# description: The irqbalance daemon will distribute interrupts across \
|
||||
# the cpus on a multiprocessor system with the purpose of \
|
||||
# spreading the load. \
|
||||
# processname: irqbalance
|
||||
|
||||
|
||||
# This is an interactive program, we need the current locale
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
# Check that we're a priviledged user
|
||||
[ `id -u` = 0 ] || exit 0
|
||||
|
||||
|
||||
prog="irqbalance"
|
||||
|
||||
# Check that networking is up.
|
||||
if [ "$NETWORKING" = "no" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
[ -f /usr/sbin/irqbalance ] || exit 0
|
||||
|
||||
# fetch configuration if it exists
|
||||
# ONESHOT=yes says to wait for a minute, then look at the interrupt
|
||||
# load and balance it once; after balancing exit and do not change
|
||||
# it again.
|
||||
# The default is to keep rebalancing once every 10 seconds.
|
||||
ONESHOT=
|
||||
[ -f /etc/sysconfig/irqbalance ] && . /etc/sysconfig/irqbalance
|
||||
case "$ONESHOT" in
|
||||
y*|Y*|on) ONESHOT=--oneshot ;;
|
||||
*) ONESHOT= ;;
|
||||
esac
|
||||
|
||||
RETVAL=0
|
||||
|
||||
start() {
|
||||
echo -n $"Starting $prog: "
|
||||
daemon irqbalance $ONESHOT
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 -a -n "$ONESHOT" ] && touch /var/lock/subsys/irqbalance
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $prog: "
|
||||
killproc irqbalance
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/irqbalance
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status irqbalance
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
condrestart)
|
||||
[ -f /var/lock/subsys/irqbalance ] && restart || :
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
67
irqbalance.spec
Normal file
67
irqbalance.spec
Normal file
@ -0,0 +1,67 @@
|
||||
Summary: IRQ balancing daemon.
|
||||
Name: irqbalance
|
||||
Version: 1.12
|
||||
Release: %(R="$Revision$"; RR="${R##: }"; echo ${RR%%?})
|
||||
Serial: 1
|
||||
Group: System Environment/Base
|
||||
License: GPL/OSL
|
||||
Source0: irqbalance-0.12.tar.gz
|
||||
Source1: irqbalance.init
|
||||
Source2: irqbalance.sysconfig
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
||||
Prereq: /sbin/chkconfig /sbin/service
|
||||
Patch1: irqbalance-pie.patch
|
||||
ExclusiveArch: i386 x86_64 ia64
|
||||
|
||||
%description
|
||||
irqbalance is a daemon that evenly distributes IRQ load across
|
||||
multiple CPUs for enhanced performance.
|
||||
|
||||
%prep
|
||||
%setup -q -c -a 0
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
mkdir -p %{buildroot}/usr/sbin
|
||||
mkdir -p %{buildroot}/usr/man
|
||||
mkdir -p %{buildroot}/etc/rc.d/init.d
|
||||
mkdir -p %{buildroot}/etc/sysconfig
|
||||
|
||||
cd irqbalance
|
||||
make
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}/usr/share/man/man{1,8}
|
||||
|
||||
cd irqbalance
|
||||
install irqbalance %{buildroot}/usr/sbin
|
||||
install %{SOURCE91} %{buildroot}/etc/rc.d/init.d/irqbalance
|
||||
install %{SOURCE92} %{buildroot}/etc/sysconfig/irqbalance
|
||||
install irqbalance.1 %{buildroot}/usr/share/man/man1/
|
||||
|
||||
chmod -R a-s %{buildroot}
|
||||
|
||||
%clean
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/usr/sbin/irqbalance
|
||||
%attr(0644,root,root) %{_mandir}/*/*
|
||||
/etc/rc.d/init.d/irqbalance
|
||||
%attr(0644,root,root) /etc/sysconfig/irqbalance
|
||||
|
||||
%preun
|
||||
if [ "$1" = "0" ] ; then
|
||||
/sbin/chkconfig --del irqbalance
|
||||
fi
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add irqbalance
|
||||
|
||||
%changelog
|
||||
* Sat Dec 18 2004 Dave Jones <davej@redhat.com>
|
||||
- Initial packaging, based on kernel-utils.
|
||||
|
9
irqbalance.sysconfig
Executable file
9
irqbalance.sysconfig
Executable file
@ -0,0 +1,9 @@
|
||||
# irqbalance is a daemon process that distributes interrupts across
|
||||
# CPUS on SMP systems. The default is to rebalance once every 10
|
||||
# seconds. There is one configuration option:
|
||||
#
|
||||
# ONESHOT=yes
|
||||
# after starting, wait for a minute, then look at the interrupt
|
||||
# load and balance it once; after balancing exit and do not change
|
||||
# it again.
|
||||
ONESHOT=
|
Loading…
Reference in New Issue
Block a user