Bug 34312

Summary: Missing shutdown procedures (qa0328 and all other)
Product: [Retired] Red Hat Linux Reporter: Michal Jaegermann <michal>
Component: nutAssignee: Than Ngo <than>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

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

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. ***