Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322425 - sys-power/nut-2.4.3-r1: nut.powerfail expects /usr and /var to be available during shutdown
Summary: sys-power/nut-2.4.3-r1: nut.powerfail expects /usr and /var to be available d...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 03:36 UTC by Matthew Stapleton
Modified: 2010-06-17 19:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
nut.powerfail.patch (nut.powerfail.patch,727 bytes, patch)
2010-06-10 01:11 UTC, Matthew Stapleton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Stapleton 2010-06-02 03:36:43 UTC
The nut.powerfail script for openrc sets UPS_CTL to /usr/sbin/upsdrvctl which isn't available at shutdown if /usr is a separate partition.  baselayout-1 uses /sbin/upsdrvctl to workaround this.  nut.powerfail also uses runlevel to confirm that the current runlevel is 0 before running the UPS kill power command but this won't work either if /var is a separate partition.  Since nut.powerfail is normally only in the shutdown runlevel anyway this check might not be needed.

Also, if no power fail files are found such as during a normal shutdown nut.powerfail displays a warning that a UPS powerfail script was scheduled but it should just exit silently instead.

Reproducible: Always

Steps to Reproduce:
Comment 1 Matthew Stapleton 2010-06-10 01:11:10 UTC
Created attachment 234797 [details, diff]
nut.powerfail.patch

A patch that fixes all the problems mentioned
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-06-17 19:39:09 UTC
Fixed in CVS, thanks for the patch.