Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
apcupsd
apcupsd-hibernate.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File apcupsd-hibernate.patch of Package apcupsd
--- platforms/apccontrol.in +++ platforms/apccontrol.in @@ -20,6 +20,7 @@ APCPID=@PIDDIR@/apcupsd.pid APCUPSD=@sbindir@/apcupsd +HIBERNATE=/usr/bin/systemctl hibernate SHUTDOWN=@SHUTDOWN@ SCRIPTSHELL=@SCRIPTSHELL@ SCRIPTDIR=@sysconfdir@ @@ -103,8 +104,14 @@ case "$1" in ${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot" ;; doshutdown) - echo "UPS ${2} initiated Shutdown Sequence" | ${WALL} - ${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown" + . /etc/sysconfig/apcupsd + if test "$APCUPSD_POWERFAIL_BEHAVIOR" = "hibernate" ; then + echo "UPS ${2} initiated hibernation" | ${WALL} + $HIBERNATE + else + echo "UPS ${2} initiated Shutdown Sequence" | ${WALL} + ${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown" + fi ;; annoyme) echo "Power problems with UPS ${2}. Please logoff." | ${WALL}
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor