diff options
Diffstat (limited to 'sys-apps/apcupsd/files/halt')
-rwxr-xr-x | sys-apps/apcupsd/files/halt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys-apps/apcupsd/files/halt b/sys-apps/apcupsd/files/halt new file mode 100755 index 000000000000..3d2a9422e266 --- /dev/null +++ b/sys-apps/apcupsd/files/halt @@ -0,0 +1,24 @@ +#!/bin/sh +# +# halt Execute the halt command. +# +# Version: @(#)halt 2.75 19-May-1998 miquels@cistron.nl +# modified by Holger Brueckner <darksi@gentoo.org> +# for apcupsd 28-June-2001 + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +APCCONTROL="/etc/apcupsd/apccontrol killpower" + +# See if we need to cut the power. + +# See if this is a powerfail situation. +if [ -f /etc/apcupsd/powerfail ]; then + echo "APCUPSD to the Rescue!" + echo + $APCCONTROL + echo + sleep 120 + exit 1 +fi + +/sbin/halt -nfip |