summaryrefslogtreecommitdiffstats
path: root/abs/extra/irqbalance
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2010-09-05 06:13:57 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2010-09-05 06:13:57 (GMT)
commitb172f79fadb565ecfbcec9508f9377d8618a4f4c (patch)
treebf8823b07e3313c3afa000a9b31e4f9a735cb818 /abs/extra/irqbalance
parentf9d54ab7c3853208484e304bc6cf40ab0f79d400 (diff)
parent5e7027c6194237ca1dc5fcbb3648483a970fb500 (diff)
downloadlinhes_pkgbuild-b172f79fadb565ecfbcec9508f9377d8618a4f4c.zip
linhes_pkgbuild-b172f79fadb565ecfbcec9508f9377d8618a4f4c.tar.gz
linhes_pkgbuild-b172f79fadb565ecfbcec9508f9377d8618a4f4c.tar.bz2
Merge branch 'HEAD' of ssh://cesman@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/extra/irqbalance')
-rw-r--r--abs/extra/irqbalance/PKGBUILD25
-rw-r--r--abs/extra/irqbalance/finish15
-rw-r--r--abs/extra/irqbalance/irqbalance.install10
-rw-r--r--abs/extra/irqbalance/run25
4 files changed, 66 insertions, 9 deletions
diff --git a/abs/extra/irqbalance/PKGBUILD b/abs/extra/irqbalance/PKGBUILD
index 5d823cd..a21cda2 100644
--- a/abs/extra/irqbalance/PKGBUILD
+++ b/abs/extra/irqbalance/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=irqbalance
pkgver=0.55
-pkgrel=3
+pkgrel=4
pkgdesc="IRQ balancing daemon for SMP systems"
arch=('i686' 'x86_64')
url="http://www.irqbalance.org/"
@@ -11,14 +11,13 @@ license=('GPL')
depends=(glib2)
makedepends=(pkgconfig)
backup=(etc/conf.d/irqbalance)
+install=($pkgname.install)
source=(http://www.irqbalance.org/releases/$pkgname-$pkgver.tar.gz
Makefile.irqbalance
irqbalance.conf.d
- irqbalance.rc.d)
-md5sums=('9f6b314ff1fdc14173abeb40592d4edf'
- '45bc9e1d041d8547f2dbf12f887216df'
- '336c1ee99818f9ecda1687e34c69fd6b'
- '96efae052553711f74a61760cefa93b5')
+ run
+ finish
+ irqbalance.install)
build() {
cd $srcdir/$pkgname-$pkgver
@@ -26,7 +25,15 @@ build() {
cp ../Makefile.irqbalance Makefile
make || return 1
- install -D -m755 irqbalance $pkgdir/usr/sbin/irqbalance
- install -D -m644 ../irqbalance.conf.d $pkgdir/etc/conf.d/irqbalance
- install -D -m755 ../irqbalance.rc.d $pkgdir/etc/rc.d/irqbalance
+ install -D -m755 irqbalance $pkgdir/usr/sbin/irqbalance || return 1
+ mkdir -p $pkgdir/etc/sv/irqbalance || return 1
+ install -D -m644 ../irqbalance.conf.d $pkgdir/etc/conf.d/irqbalance || return 1
+ install -D -m755 ../run $pkgdir/etc/sv/irqbalance || return 1
+ install -D -m755 ../finish $pkgdir/etc/sv/irqbalance || return 1
}
+md5sums=('9f6b314ff1fdc14173abeb40592d4edf'
+ '45bc9e1d041d8547f2dbf12f887216df'
+ '336c1ee99818f9ecda1687e34c69fd6b'
+ '7f3ee7fb2fccb619f7c66668b6d96d35'
+ 'ebb35e88267f4c2e6f68e675c81b2a34'
+ '5f5e96d2fbf35e85d4a8004a3d6b73fc')
diff --git a/abs/extra/irqbalance/finish b/abs/extra/irqbalance/finish
new file mode 100644
index 0000000..ccd9278
--- /dev/null
+++ b/abs/extra/irqbalance/finish
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/irqbalance`
+
+ stat_runit "Stopping IRQ balancing"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon irqbalance
+ stat_done
+ fi
diff --git a/abs/extra/irqbalance/irqbalance.install b/abs/extra/irqbalance/irqbalance.install
new file mode 100644
index 0000000..d4e15f1
--- /dev/null
+++ b/abs/extra/irqbalance/irqbalance.install
@@ -0,0 +1,10 @@
+post_install () {
+ add_service.sh irqbalance
+
+}
+
+pre_remove () {
+ remove_service.sh irqbalance
+
+}
+
diff --git a/abs/extra/irqbalance/run b/abs/extra/irqbalance/run
new file mode 100644
index 0000000..f0d18f7
--- /dev/null
+++ b/abs/extra/irqbalance/run
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# source application-specific settings
+ONESHOT=0
+[ -f /etc/conf.d/irqbalance ] && . /etc/conf.d/irqbalance
+
+if [ "$ONESHOT" -ne 0 ]; then
+ ONESHOT_CMD="oneshot"
+fi
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/irqbalance`
+
+ stat_runit "Starting IRQ balancing"
+ [ -z "$PID" ] && /usr/sbin/irqbalance --debug $ONESHOT_CMD >/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ if [ "$ONESHOT" -eq 0 ]; then
+ add_daemon irqbalance
+ fi
+ stat_done
+ fi