upsd (/usr/ports/sysutils/upsd) does not have a startup/shutdown script for placement into /usr/local/etc/rc.d. So, after doing a 'make install' for this port there's nothing that will make sure that upsd is running after a reboot. Fix: I wrote a simple script to manage upsd. This goes into the /usr/local/etc/rc.d directory. ----- #!/bin/sh case "$1" in start) echo -n ' upsd' /usr/local/sbin/upsd ;; stop) [ -f /var/run/upsd.pid ] && kill -TERM `cat /var/run/upsd.pid` && echo -n ' upsd' ;; *) echo "Usage: `basename $0` {start|stop}" >&2 ;; esac exit 0
After looking at the code (c.f. PR ports/21556) I saw that upsd doesn't understand SIGTERM. So the shutdown script should use SIGQUIT (which the daemon does recognize) instead. Here's the patch to my posted script: --- upsd.sh Mon Sep 25 23:45:40 2000 +++ /usr/local/etc/rc.d/upsd.sh Mon Sep 25 17:12:15 2000 @@ -6,7 +6,7 @@ /usr/local/sbin/upsd ;; stop) - [ -f /var/run/upsd.pid ] && kill -TERM `cat /var/run/upsd.pid` && echo -n ' upsd' + [ -f /var/run/upsd.pid ] && kill -QUIT `cat /var/run/upsd.pid` && echo -n ' upsd' ;; *) echo "Usage: `basename $0` {start|stop}" >&2
State Changed From-To: open->closed Committed with updates. Thanks.