diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-10-26 09:42:41 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-10-26 09:42:41 +0000 |
commit | 21bc3ff0b7a620a08f55f2da39c2cf6772c2f4b7 (patch) | |
tree | 1ddc6fbf909e15f08cb857ebae711e2916a99327 /unstable | |
parent | 97b09887210fa84caaaae7263422da5c1f87aa94 (diff) | |
download | aports-21bc3ff0b7a620a08f55f2da39c2cf6772c2f4b7.tar.bz2 aports-21bc3ff0b7a620a08f55f2da39c2cf6772c2f4b7.tar.xz |
unstable/apcupsd: upgrade to 3.14.7. busybox support
* use busybox poweroff/reboot
* workaround missing wall
Diffstat (limited to 'unstable')
-rw-r--r-- | unstable/apcupsd/APKBUILD | 12 | ||||
-rw-r--r-- | unstable/apcupsd/apcupsd-alpine.patch | 41 |
2 files changed, 49 insertions, 4 deletions
diff --git a/unstable/apcupsd/APKBUILD b/unstable/apcupsd/APKBUILD index 5be90f9c96..4adc8c0966 100644 --- a/unstable/apcupsd/APKBUILD +++ b/unstable/apcupsd/APKBUILD @@ -1,6 +1,6 @@ pkgname=apcupsd -pkgver=3.14.6 -pkgrel=1 +pkgver=3.14.7 +pkgrel=0 pkgdesc="A Daemon to control APC UPSes" subpackages="$pkgname-doc" url="http://www.apcupsd.org" @@ -9,11 +9,14 @@ depends="util-linux-ng" makedepends= source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz apcupsd.initd + apcupsd-alpine.patch " build() { cd "$srcdir/$pkgname-$pkgver" + patch -p1 < ../apcupsd-alpine.patch || return 1 + ac_cv_path_SHUTDOWN="/sbin/poweroff" \ ./configure --prefix=/usr \ --mandir=/usr/share/man \ --enable-usb @@ -22,5 +25,6 @@ build() { install -D -m755 "$srcdir"/apcupsd.initd "$pkgdir"/etc/init.d/apcupsd } -md5sums="7df2dbe325a6b1822763cbf6a9fa8263 apcupsd-3.14.6.tar.gz -0798cd407de6f199d4c267036ec54c5b apcupsd.initd" +md5sums="bb2f8e4fc6b2f5d7b3e236eb57b81640 apcupsd-3.14.7.tar.gz +0798cd407de6f199d4c267036ec54c5b apcupsd.initd +08d9cc703cdd4275d342882deed1d719 apcupsd-alpine.patch" diff --git a/unstable/apcupsd/apcupsd-alpine.patch b/unstable/apcupsd/apcupsd-alpine.patch new file mode 100644 index 0000000000..3f5c6965b7 --- /dev/null +++ b/unstable/apcupsd/apcupsd-alpine.patch @@ -0,0 +1,41 @@ +--- a/platforms/apccontrol.in Mon Oct 26 09:12:30 2009 ++++ b/platforms/apccontrol.in Mon Oct 26 09:36:47 2009 +@@ -20,11 +20,20 @@ + + APCPID=@PIDDIR@/apcupsd.pid + APCUPSD=@sbindir@/apcupsd +-SHUTDOWN=@SHUTDOWN@ ++POWEROFF=/sbin/poweroff ++REBOOT=/sbin/reboot + SCRIPTSHELL=@SCRIPTSHELL@ + SCRIPTDIR=@sysconfdir@ +-WALL=wall ++WALL=_wall + ++_wall() { ++ local i ++ local msg=$(cat) ++ for i in /dev/pts/*; do ++ [ -c "$i" ] && echo "$msg" > $i ++ done ++} ++ + # + # Concatenate all output from this script to the events file + # Note, the following kills the script in a power fail situation +@@ -100,11 +109,13 @@ + ;; + doreboot) + echo "UPS ${2} initiating Reboot Sequence" | ${WALL} +- ${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot" ++ echo "apcupsd UPS ${2} initiated reboot" | ${WALL} ++ $REBOOT + ;; + doshutdown) + echo "UPS ${2} initiated Shutdown Sequence" | ${WALL} +- ${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown" ++ echo "apcupsd UPS ${2} initiated shutdown" | ${WALL} ++ $POWEROFF + ;; + annoyme) + echo "Power problems with UPS ${2}. Please logoff." | ${WALL} |