Bug 962937 - NUT init script does not have correct return value with SERVER=no
NUT init script does not have correct return value with SERVER=no
Status: CLOSED ERRATA
Product: Fedora EPEL
Classification: Fedora
Component: nut (Show other bugs)
el6
Unspecified Linux
unspecified Severity medium
: ---
: ---
Assigned To: Michal Hlavinka
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-14 15:29 EDT by Phil! Gold
Modified: 2013-05-31 13:54 EDT (History)
1 user (show)

See Also:
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 13:54:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Always use $RETVAL. (610 bytes, patch)
2013-05-14 15:29 EDT, Phil! Gold
no flags Details | Diff

  None (edit)
Description Phil! Gold 2013-05-14 15:29:07 EDT
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 11:15:10 EDT
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 15:44:07 EDT
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 13:54:59 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.