RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 754984 - Missing apcupsd support in halt script
Summary: Missing apcupsd support in halt script
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 759573 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-18 13:44 UTC by Robert Scheck
Modified: 2018-11-27 21:11 UTC (History)
13 users (show)

Fixed In Version: initscripts-9.03.28-1.el6
Doc Type: Bug Fix
Doc Text:
Previous version of initscripts did not contain support for apcupsd. This version turns off UPS in powerfail situation.
Clone Of:
Environment:
Last Closed: 2012-06-20 13:09:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
initscripts-9.03.23-apcupsd.patch (684 bytes, patch)
2011-11-18 13:45 UTC, Robert Scheck
no flags Details | Diff
Content of /etc/sysconfig/ups (229 bytes, text/plain)
2011-12-19 17:16 UTC, Robert Scheck
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 66392 0 None None None Never
Red Hat Product Errata RHBA-2012:0816 0 normal SHIPPED_LIVE initscripts bug fix and enhancement update 2012-06-19 20:34:23 UTC

Description Robert Scheck 2011-11-18 13:44:29 UTC
Description of problem:
Currently /etc/rc.d/init.d/halt has the necessary section to support "nut" but 
not the bits needed for apcupsd.

Version-Release number of selected component (if applicable):
initscripts-9.03.23-1.el6

How reproducible:
Everytime

Actual results:
Missing apcupsd support in halt script

Expected results:
Give end users of apcupsd full "out of the box" experience by adding a killpower
section to /etc/rc.d/init.d/halt.

Additional info:
Please use the attached patch or better.

Comment 1 Robert Scheck 2011-11-18 13:45:07 UTC
Created attachment 534395 [details]
initscripts-9.03.23-apcupsd.patch

Comment 2 Robert Scheck 2011-11-18 13:54:09 UTC
I have cross-filled case 00564055 and 00564056 (different customers) in the 
customer portal at the Red Hat Network.

Comment 5 Bill Nottingham 2011-11-22 15:56:12 UTC
Given we don't ship/support apcupsd in RHEL, I'd be inclined to leave this sort of support for halt.local. I know nut is there, but that predates the RHEL fork.

Comment 6 Robert Scheck 2011-11-22 16:16:11 UTC
This patch is really micro and does definately not hurt any existing customers
of RHEL. See also comment #2, this issue affects paying customers.

Comment 7 Robert Scheck 2011-11-22 16:23:43 UTC
By the way.../sbin/halt.local is NOT suitable for us in this case, because it
is unfortunately executed too early. Remounting remaining filesystems readonly
has to be performed first, otherwise it will cause some other trouble.

Comment 9 Bill Nottingham 2011-11-23 19:02:19 UTC
So, various suggestions:

- Use nut instead. That support is already integrated, and it *should* work for most of the same models, if I'm reading the support page right.

- Use halt.local. You'd need some sleep commands, which would be racy, but it may be hacked to work. (not really recommended)

- Create a custom /etc/init.d/halt script... we don't upgrade that script much, and they'd have to patch it back in place across upgrades, but it could work as a hot fix.

- The code to support nut in /etc/init.d/halt has:

# Shutdown UPS drivers
if [ "$command" = /sbin/halt -a -f /etc/sysconfig/ups ]; then
        . /etc/sysconfig/ups

There's nothing that states that an administrator's /etc/sysconfig/ups couldn't run apcupsd shutdown comamnds when sourced in this way. (Hooray, hacks!)

Comment 10 Robert Scheck 2011-11-23 22:14:50 UTC
Again, this is RHEL and thus IMHO not the place for such hackish suggestions, 
that are either racy or not upgrade-safe. I'm not going to put such stuff on 
productive machines as long as paid RHEL subscriptions are used. I will push
this further on via the customer portal now...

Comment 14 Michal Hlavinka 2011-12-05 10:42:50 UTC
*** Bug 759573 has been marked as a duplicate of this bug. ***

Comment 17 Robert Scheck 2011-12-19 17:16:23 UTC
Created attachment 548645 [details]
Content of /etc/sysconfig/ups

Hackish suggestion via Red Hat Support Team by abusing /etc/sysconfig/ups

Comment 23 Lukáš Nykrýn 2012-03-22 11:09:49 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previous version of initscripts did not contain support for apcupsd. This version turns off UPS in powerfail situation.

Comment 25 errata-xmlrpc 2012-06-20 13:09:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0816.html


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