Bug 962937 - NUT init script does not have correct return value with SERVER=no
Summary: NUT init script does not have correct return value with SERVER=no
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nut
Version: el6
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-14 19:29 UTC by Phil! Gold
Modified: 2013-05-31 17:54 UTC (History)
1 user (show)

Fixed In Version: nut-2.6.5-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-31 17:54:59 UTC


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

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.


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