Bugzilla – Bug 141948
Return code of nut startup script prevents powersave to shutdown service
Last modified: 2006-04-05 14:28:54 UTC
When UPSLOG_INTERVAL is left empty in /etc/sysconfig/smartups, the result of 'rcups status' will be Checking for NUT: /usr/sbin/upsd: running /usr/sbin/upsmon: running /usr/bin/upslog: unused On my system, it turns out that 'ups' must be added to POWERSAVE_SUSPEND2DISK_RESTART_SERVICES in /etc/sysconfig/powersave/sleep, since it won't work after the system wakes up again and needs to be restarted. However, the script that performs this job sees the 'ups' service is not running, since it only looks at the last result code. In other words, the return code of 'rcups status' will be 'unused' and powersave will *not* stop this service when going to the suspend state and won't start it again. Suggestion is to move the order of the 'checkproc' lines in /etc/init.d/ups, so that the last service checked, will be 'upsmon' (which will always be running). In that case, powersave will properly detect that the 'ups' service is running.
> Suggestion is to move the order of the 'checkproc' lines in /etc/init.d/ups, so > that the last service checked, will be 'upsmon' (which will always be running). > In that case, powersave will properly detect that the 'ups' service is running. Forget about the above part, this doesn't work. There should be no checkproc for upslog if the service wasn't started. So the same test for a non-empty logging interval as is used for starting and stopping the service, should be applied to the status.
New scripts created, upslog is no more started there. I hope it's fixed now.
Closing.