mirror of
https://github.com/openwrt/packages.git
synced 2026-06-13 09:01:28 +08:00
acpid: prevent duplicate daemon instances
The hotplug script directly invokes /usr/sbin/acpid. If hotplug fires before procd starts acpid, it cannot stop the procd-managed instance, resulting in a second unmanaged acpid process running alongside it. Fix this issue by letting ONLY procd manage the acpi daemon. Signed-off-by: Oliver Sedlbauer <os@dev.tdt.de>
This commit is contained in:
committed by
Florian Eckert
parent
4faa112269
commit
8744a706f1
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=acpid
|
||||
PKG_VERSION:=2.0.34
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@SF/acpid2
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
if [ "$ACTION" = add ] && [ "$DEVICENAME" = event0 ]; then
|
||||
( /etc/init.d/acpid/stop; sleep 3; /usr/sbin/acpid )&
|
||||
/etc/init.d/acpid start
|
||||
fi
|
||||
|
||||
@@ -12,6 +12,7 @@ start_service() {
|
||||
procd_append_param command -f
|
||||
procd_append_param command -S
|
||||
procd_set_param pidfile "/var/run/acpid.pid"
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
|
||||
Reference in New Issue
Block a user