Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#9690 - [i8kmon] daemon does not stop properly
Attached to Project:
Arch Linux
Opened by Dawid Wróbel (cromo) - Tuesday, 26 February 2008, 14:04 GMT
Last edited by Roman Kyrylych (Romashka) - Saturday, 03 October 2009, 08:28 GMT
Opened by Dawid Wróbel (cromo) - Tuesday, 26 February 2008, 14:04 GMT
Last edited by Roman Kyrylych (Romashka) - Saturday, 03 October 2009, 08:28 GMT
|
DetailsDescription: /etc/rc.d/i8kmon stop will not stop the daemon. This is because the PID numer is determined by pidof inside the script, whereas the ik8kmon is run in tclsh session so pidof fails and returns nothing.
Steps to reproduce: Install the i8kmon package, start and stop the daemon. |
This task depends upon
1) rc.d-style schemes requires the daemon to self-background
2) i8kmon in addition forks into a tclsh shell
Solutions:
- use a pid file. This doesnt work b/c i8kmon forks
- use init with a non-forking i8kmon
#!/bin/sh
while true; do
i8kmon -d
done
- alternatively, use daemontools. Unfortunately this adds an extra dependency, but it might be worth it
- Use pgrep. Very ambiguous and possibly unsafe, but only feasible solution. Change /etc/rc.d/i8kmon to
#PID=`pidof -o %PPID /usr/bin/i8kmon`
PID=$(pgrep -G root -ofx "tclsh /usr/bin/i8kmon -- -d")
- the above entire process can be simply automated by start-stop-daemon. Arch doesnt have start-stop-daemon
Problem (temporarily) solved
I should take a look on it during weekend. Anyway I agree that it should be better moved to AUR.
Found an elegant solution: fuser -k /proc/i8k :-)
# fuser /proc/i8k
/proc/i8k: 2081
The '/proc/i8k:' part is from stderr, the PID is from stdout!
I tried to cut/sed/grep the PID and could not realize why nothing works :P
@Thayer: there is an updated version at http://packages.debian.org/sid/i8kutils.
If you don't want to maintain the package anymore - I can take it (either in extra or community).