Bug 732151 - nut-client in netclient mode causes a job failed error on startup
Summary: nut-client in netclient mode causes a job failed error on startup
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: nut
Version: 15
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 736249 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-20 02:43 UTC by brian
Modified: 2011-09-14 22:31 UTC (History)
2 users (show)

Fixed In Version: nut-2.6.1-3.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-14 22:30:52 UTC


Attachments (Terms of Use)

Description brian 2011-08-20 02:43:08 UTC
Description of problem:
The /etc/rc.d/init.d/ups script does not exit with a status 0 if the system is only running upsmon under the netclient mode. It appears that if running in one of the server modes RETVAL gets set initially but it never gets set if running as netclient since that portion of the script is skipped. Setting RETVAL to 0 at the beginning of the script appears to confirm this. 

The error is only a false positive - upsmon does run as expected.


Version-Release number of selected component (if applicable):
nut-client-2.6.1-3.fc15.x86_64

How reproducible:
Install nut-client on a vanilla box and execute "service start ups".

Steps to Reproduce:
1.
2.
3.
  
Actual results:
[root@bali etc]# service ups restart
Restarting ups (via systemctl):  Job failed. See system logs and 'systemctl status' for details.
                                                           [FAILED]
[root@bali etc]# echo $?
1


Expected results:
[root@puppet-testbed init.d]# service ups start
Starting ups (via systemctl):                              [  OK  ]
[root@puppet-testbed init.d]# echo $?
0


Additional info:

Comment 1 Michal Hlavinka 2011-08-22 15:06:44 UTC
Thanks, I've checked it and the code is even completely wrong, it won't report failure in some cases, where RETVAL=$? was after if test.

Comment 2 Fedora Update System 2011-08-22 16:00:50 UTC
nut-2.6.1-3.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/nut-2.6.1-3.fc14

Comment 3 Fedora Update System 2011-08-22 16:01:05 UTC
nut-2.6.1-4.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/nut-2.6.1-4.fc15

Comment 4 Fedora Update System 2011-08-23 04:32:20 UTC
Package nut-2.6.1-3.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing nut-2.6.1-3.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/nut-2.6.1-3.fc14
then log in and leave karma (feedback).

Comment 5 Michal Hlavinka 2011-09-09 08:55:27 UTC
*** Bug 736249 has been marked as a duplicate of this bug. ***

Comment 6 Fedora Update System 2011-09-14 22:30:28 UTC
nut-2.6.1-4.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2011-09-14 22:31:30 UTC
nut-2.6.1-3.fc14 has been pushed to the Fedora 14 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.