Bug 962937

Summary: NUT init script does not have correct return value with SERVER=no
Product: [Fedora] Fedora EPEL Reporter: Phil! Gold <phil_g>
Component: nutAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: el6CC: mhlavink
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: nut-2.6.5-2.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-31 17:54:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Always use $RETVAL. none

Description Phil! Gold 2013-05-14 19:29:07 UTC
Created attachment 747880 [details]
Always use $RETVAL.

Description of problem:

If /etc/sysconfig/ups has "SERVER=no", the NUT init script has a nonzero return value even if it succeeded in starting upsmon.

Version-Release number of selected component (if applicable):

2.6.5-1.el6

How reproducible:

Always.

Steps to Reproduce:
1. Configure NUT as a client.
2. Edit /etc/sysconfig/ups and set "SERVER=no".
3. Run `service ups start`.
4. Run `service ups stop`.
  
Actual results:

% sudo service ups start; echo $?
Starting UPS monitor (slave):                              [  OK  ]
1
% sudo service ups stop; echo $?
Stopping UPS monitor:                                      [  OK  ]
1
%

Expected results:

% sudo service ups start; echo $?
Starting UPS monitor (slave):                              [  OK  ]
0
% sudo service ups stop; echo $?
Stopping UPS monitor:                                      [  OK  ]
0
%

Additional info:

I'm attaching a patch to the init script that fixes the problem on my system.

Comment 1 Fedora Update System 2013-05-15 15:15:10 UTC
nut-2.6.5-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/nut-2.6.5-2.el6

Comment 2 Fedora Update System 2013-05-15 19:44:07 UTC
Package nut-2.6.5-2.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing nut-2.6.5-2.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-5821/nut-2.6.5-2.el6
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2013-05-31 17:54:59 UTC
nut-2.6.5-2.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.