acpid: convert to procd
authorRosen Penev <rosenp@gmail.com>
Fri, 6 Mar 2020 02:07:40 +0000 (18:07 -0800)
committerRosen Penev <rosenp@gmail.com>
Mon, 9 Mar 2020 21:10:43 +0000 (14:10 -0700)
acpid has no option -x, so removed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
utils/acpid/Makefile
utils/acpid/files/acpid.init

index 97f9c51d83c3808a641c560e7c0f1d5ad3428f33..5217c29627fc67963650afbe6258e2adcdc11f67 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=acpid
 PKG_VERSION:=2.0.32
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/acpid2
index 3365aa02210365cc033f7f488bc9bd976e94d30c..c860327caeef3984cc9c2f9ed7b2c9496a6e6744 100644 (file)
@@ -4,22 +4,16 @@
 START=99
 STOP=80
 
-ACPID_BIN="/usr/sbin/acpid"
-ACPID_PID="/var/run/acpid.pid"
+USE_PROCD=1
 
-start() {
-    [ -x "$ACPID_BIN" ] || return 1
-    start-stop-daemon -S -x $ACPID_BIN -p $ACPID_PID
+start_service() {
+       procd_open_instance
+       procd_set_param command "/usr/sbin/acpid"
+       procd_append_param command -f
+       procd_append_param command -S
+       procd_set_param pidfile "/var/run/acpid.pid"
 }
 
-boot() {
-       # Do nothing on boot
-       [ -x "$ACPID_BIN" ] || return 1
-       start-stop-daemon -S -x $ACPID_BIN -p $ACPID_PID
-       exit 0
-}
-
-stop() {
-       service_kill ${ACPID_BIN##*/} $ACPID_PID
-       rm -f $ACPID_PID
+reload_service()\ {
+       procd_send_signal "acpid"
 }