As per halevt's man page, it's default pid file is '/var/lib/run/halevt/halevt.pid'. The packaged init script calls start-stop-daemon with the argument '--pidfile /var/run/halevt.pid'. As a result the init script cannot stop the daemon. Running '/etc/init.d/halevt stop' fails silently because the pid file it's looking for does not exist. Running '/etc/init.d/halevt restart' causes multiple halevt daemons to run (the first silently fails to stop and a new one gets started successfully). To fix: modify the init script to either: a. pass '-p /var/run/halevt.pid' to halevt (i.e. "start-stop-daemon --start --pidfile /var/run/halevt.pid --exec /usr/bin/halevt -- -p /var/run/halevt -u root -g plugdev > /dev/null") or b. change start-stop-daemon to use the default pid file (i.e. "start-stop-daemon --start --pidfile /var/lib/run/halevt/halevt.pid --exec ..." and "start-stop-daemon --stop --pidfile /var/lib/run/halevt/halevt.pid") Reproducible: Always Steps to Reproduce: 1. Run '/etc/init.d/halevt start'. 2. Note that halevt is running (`ps aux | grep halevt`) but no halevt.pid file exists in /var/run, a halevt.pid exists in /var/lib/run/halevt 3. Run '/etc/init.d/halevt restart' 4. Note two copies of halevt are now running. Expected Results: `/etc/init.d/halevt stop` should stop the daemon.
@hwoarang: kargig@void.gr is not a valid bugzilla account. Please fix that in metadata.xml.
Adding proxy maintainer to that I ll fix the metadata accordingly
+*halevt-0.1.4-r1 (17 Jun 2009) + + 17 Jun 2009; Markos Chandras <hwoarang@gentoo.org> + +halevt-0.1.4-r1.ebuild, files/halevt: + Init script fixed. Bug 274484 . Thanks to Laurence <loz.hurst@gmail.com> + for + the proposed patch Thanks for reporting this and providing a solution :) Closing Re-open if needed
New init file added that uses: start-stop-daemon --start --pidfile /var/run/halevt.pid --exec /usr/bin/halevt -- -p /var/run/halevt.pid -u root -g plugdev > /dev/null Having the pid file in /var/run/halev.pid is much more consistent with other gentoo system services.