Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 28487 Details for
Bug 46440
UPS power not killed in shutdown when using apcupsd
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Makes halt.sh configurable for NUT and apcupsd systems
halt.sh.patch (text/plain), 1.47 KB, created by
Lee Weisz
on 2004-03-31 21:33:11 UTC
(
hide
)
Description:
Makes halt.sh configurable for NUT and apcupsd systems
Filename:
MIME Type:
Creator:
Lee Weisz
Created:
2004-03-31 21:33:11 UTC
Size:
1.47 KB
patch
obsolete
>--- old/halt.sh 2004-03-29 02:55:27.000000000 +0000 >+++ new/halt.sh 2004-03-29 04:34:13.000000000 +0000 >@@ -2,6 +2,17 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/halt.sh,v 1.48 2004/02/08 11:02:20 azarah Exp $ > >+# UPS controls >+ >+# NUT >+#UPS_CTL=/sbin/upsdrvctl >+#UPS_POWERDOWN="${UPS_CTL} shutdown" >+#UPS_PF_FILE=/etc/killpower >+ >+# apcupsd >+UPS_CTL=/usr/sbin/apcupsd >+UPS_POWERDOWN="${UPS_CTL} --killpower" >+UPS_PF_FILE=/etc/apcupsd/powerfail > > # Check to see if this is a livecd, if it is read the commandline > # this mainly makes sure $CDBOOT is defined if it's a livecd >@@ -134,12 +145,12 @@ > fi > > # This is a function because its used twice below this line as: >-# [ -f /etc/killpower ] && ups_kill_power >+# [ -f /etc/killpower ] && ${UPS_PF_FILE} > ups_kill_power() { >- if [ -x /sbin/upsdrvctl ] >+ if [ -x ${UPS_CTL} ] > then > ewarn "Signalling ups driver(s) to kill the load!" >- /sbin/upsdrvctl shutdown >+ ${UPS_POWERDOWN} > ewarn "Halt system and wait for the UPS to kill our power" > /sbin/halt -id > while [ 1 ]; do sleep 60; done >@@ -172,7 +183,7 @@ > then > eend 1 > sync; sync >- [ -f /etc/killpower ] && ups_kill_power >+ [ -f ${UPS_PF_FILE} ] && ups_kill_power > /sbin/sulogin -t 10 /dev/console > else > eend 0 >@@ -192,7 +203,7 @@ > ewarn "A full fsck will be forced on next startup" > fi > >-[ -f /etc/killpower ] && ups_kill_power >+[ -f ${UPS_PF_FILE} ] && ups_kill_power > > > # vim:ts=4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 46440
: 28487 |
37319