Bug 34312 - Missing shutdown procedures (qa0328 and all other)
Missing shutdown procedures (qa0328 and all other)
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: nut (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
Brian Brock
:
: 37273 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-01 17:33 EDT by Michal Jaegermann
Modified: 2007-04-18 12:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-01 17:33:37 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 Michal Jaegermann 2001-04-01 17:33:34 EDT
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 19:00:46 EDT
It's fixed in initscripts-5.84. Thanks
Comment 2 Ngo Than 2001-04-23 19:01:25 EDT
*** 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.