mirror of
https://git.openwrt.org/feed/packages.git
synced 2024-06-16 12:23:59 +02:00
apcupsd: preset shutdown binary
Signed-off-by: Othmar Truniger <github@truniger.ch>
This commit is contained in:
parent
149afa5dcb
commit
8b618efe21
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=apcupsd
|
PKG_NAME:=apcupsd
|
||||||
PKG_VERSION:=3.14.14
|
PKG_VERSION:=3.14.14
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
|
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
@ -39,6 +39,8 @@ define Package/apcupsd-cgi
|
||||||
URL:=http://www.apcupsd.org/
|
URL:=http://www.apcupsd.org/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_VARS += SHUTDOWN=/sbin/halt
|
||||||
|
|
||||||
define Build/Configure
|
define Build/Configure
|
||||||
$(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/
|
$(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/
|
||||||
$(call Build/Configure/Default, \
|
$(call Build/Configure/Default, \
|
||||||
|
|
|
@ -20,7 +20,7 @@ exec_prefix=/usr
|
||||||
|
|
||||||
APCPID=/var/run/apcupsd.pid
|
APCPID=/var/run/apcupsd.pid
|
||||||
APCUPSD=/usr/sbin/apcupsd
|
APCUPSD=/usr/sbin/apcupsd
|
||||||
SHUTDOWN=/sbin/shutdown
|
SHUTDOWN=/sbin/halt
|
||||||
SCRIPTSHELL=/bin/sh
|
SCRIPTSHELL=/bin/sh
|
||||||
SCRIPTDIR=/etc/apcupsd
|
SCRIPTDIR=/etc/apcupsd
|
||||||
WALL=true
|
WALL=true
|
||||||
|
@ -101,11 +101,11 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
doreboot)
|
doreboot)
|
||||||
echo "UPS ${2} initiating Reboot Sequence" | ${WALL}
|
echo "UPS ${2} initiating Reboot Sequence" | ${WALL}
|
||||||
${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot"
|
echo "apcupsd UPS ${2} initiated reboot" && /sbin/reboot
|
||||||
;;
|
;;
|
||||||
doshutdown)
|
doshutdown)
|
||||||
echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
|
echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
|
||||||
${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown"
|
echo "apcupsd UPS ${2} initiated shutdown" && /sbin/halt
|
||||||
;;
|
;;
|
||||||
annoyme)
|
annoyme)
|
||||||
echo "Power problems with UPS ${2}. Please logoff." | ${WALL}
|
echo "Power problems with UPS ${2}. Please logoff." | ${WALL}
|
||||||
|
|
10
net/apcupsd/patches/015-drop-doc.patch
Normal file
10
net/apcupsd/patches/015-drop-doc.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- a/Makefile.orig 2019-04-04 18:19:45.007668656 +0200
|
||||||
|
+++ a/Makefile 2019-04-04 18:23:00.723165465 +0200
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
topdir:=.
|
||||||
|
|
||||||
|
-SUBDIRS=src platforms doc
|
||||||
|
+SUBDIRS=src platforms
|
||||||
|
include autoconf/targets.mak
|
||||||
|
|
||||||
|
# Force platforms/ to build after src/
|
Loading…
Reference in New Issue
Block a user