Bug 237532 - command service apcupsd status returns wrong value
command service apcupsd status returns wrong value
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: apcupsd (Show other bugs)
6
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Orion Poplawski
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-23 13:46 EDT by vikram goyal
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 3.12.4-5.fc6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-23 16:09:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description vikram goyal 2007-04-23 13:46:34 EDT
Description of problem:
service apcupsd status return value $? is 0 even if it is not running.

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

apcupsd-3.12.4-4.fc6
How reproducible:

always
Steps to Reproduce:
1.service apcupsd status
2.echo $?
3.
  
Actual results:
0

Expected results:
1

Additional info:
adding || exit 1 in line 51 of /etc/init.d/apcupsd file will solve it
Comment 1 Orion Poplawski 2007-04-23 16:09:35 EDT
Fixed in 3.12.4-5.fc6.  Note that the script has been modified to follow LSB
conventions an will return different non-zero exits codes depending on the
situation.

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