Bug 141948

Summary: Return code of nut startup script prevents powersave to shutdown service
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Arjen de Korte <suse+build>
Component: OtherAssignee: Stanislav Brabec <sbrabec>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Arjen de Korte 2006-01-07 17:39:02 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.
Comment 1 Arjen de Korte 2006-01-12 21:49:05 UTC
> 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.
Comment 2 Stanislav Brabec 2006-03-21 12:37:13 UTC
New scripts created, upslog is no more started there. I hope it's fixed now.
Comment 3 Stanislav Brabec 2006-04-05 14:28:54 UTC
Closing.