Bug 34312 - Missing shutdown procedures (qa0328 and all other)
Summary: Missing shutdown procedures (qa0328 and all other)
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: nut   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ngo Than
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
: 37273 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-04-01 21:33 UTC by Michal Jaegermann
Modified: 2007-04-18 16:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-01 21:33:37 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Michal Jaegermann 2001-04-01 21:33:34 UTC
If I am reading a documentation to this package properly (not an easy
task as these docs may use a thorough rewrite) then /etc/rc.d/init.d/halt
script is missing shutdown procedures for UPS itself required when
such device is present (see 'shutodown.txt' in the said documentation).

I think that the following, inserted in 'halt' just before the last
line, would do:

switchoff_ups () {
    [ -r /etc/ups/upsmon.conf ] || return
    POWERDOWNFLAG=$( /bin/grep '^POWERDOWNFLAG' /etc/ups/upsmon.conf \
        | while read id pf rest ; do
            echo $pf
            break
        done )
    [ -f $POWERDOWNFLAG ] || return
    [ -f /etc/sysconfig/ups ] || return
    . /etc/sysconfig/ups
    [ "$SERVER" != "yes" -o "$MODEL" = "NONE" \
        -o "$MODEL" = "" -o "$DEVICE" = "" ] && return
    /usr/bin/$MODEL -k $DEVICE
}

[ "$command" = halt ] && switchoff_ups

if not for that small catch that /usr/bin may be already gone.
So either various ups drivers have to live in a place like /sbin
(actually they likely should be there) or 'halt' has to keep /usr/bin,
mounted read-only, to the last moment.

  Michal
  michal@harddata.com

Comment 1 Ngo Than 2001-04-23 23:00:46 UTC
It's fixed in initscripts-5.84. Thanks

Comment 2 Ngo Than 2001-04-23 23:01:25 UTC
*** Bug 37273 has been marked as a duplicate of this bug. ***


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