Tiny Core Linux
Tiny Core Extensions => TCE Bugs => Topic started by: jur on December 27, 2009, 02:28:50 AM
-
There are several issues:
1. '/usr/local/etc/init.d/acpid start' does not work when called from bootlocal.sh. Instead, I get startup messages that 1 rule is loaded, and that event logging is off. Why I don't know. If I stop and start acpid manually afterwards, it works just fine. Also, calling acpid from .xsession also works. But not from bootlocal.sh.
2. doing 'acpid restart' terminates but does not restart acpid. Doing 'acpid status' after restart reports 'acpid is not running'.
-
OK, let me have a look in a couple of days
-
Item 2 is a code execution issue - the stop function calls killall which terminates the function, so nothing else is executed afterwards:
tc@box:~$ sudo /usr/local/etc/init.d/acpid stop
Terminated
tc@box:~$ sudo /usr/local/etc/init.d/acpid restart
Terminated
-
Thanks - scripting was never my strong point...
-
I've tried the following to stop the daemon:
stop() {
killall acpid 2>/dev/null
}
..which works with the bluetooth and cups daemons, but for some reason with acpid, it will stop the daemon, but restart will not work.
I've searched various distros implementations of ../init.d/acpid, but didn't find any usuable alternatives for tc.
Ideas welcome
(note that acpi-2.0.0 shows the same behaviour)
-
Using start-stop-daemon seems to stop it while allowing it to run again:
stop() {
start-stop-daemon --stop --exec /usr/local/sbin/acpid 2>/dev/null
}
Start-stop-daemon is what I usually use and it normally works well.
-
doh...
I'd seen "start-stop-daemon" plenty of times in examples, assumed it wasn't present in the base, but never actually checked :-[
thanks
edit: updated acpid posted