Bug 141948 - Return code of nut startup script prevents powersave to shutdown service
Summary: Return code of nut startup script prevents powersave to shutdown service
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Other (show other bugs)
Version: unspecified
Hardware: i586 Linux
: P5 - None : Normal
Target Milestone: ---
Assignee: Stanislav Brabec
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-07 17:39 UTC by Arjen de Korte
Modified: 2006-04-05 14:28 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.