SHA256
1
0
forked from pool/nut

Accepting request 1097446 from home:ateixeira:branches:hardware

- Fix nut.system-sleep script to allow NUT usage with sleep and
  hibernation (bsc#1188990)

OBS-URL: https://build.opensuse.org/request/show/1097446
OBS-URL: https://build.opensuse.org/package/show/hardware/nut?expand=0&rev=107
This commit is contained in:
Antonio Teixeira 2023-07-10 12:42:35 +00:00 committed by Git OBS Bridge
parent 643716ae59
commit 365511b7c9
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jul 6 20:29:12 UTC 2023 - Antonio Teixeira <antonio.teixeira@suse.com>
- Fix nut.system-sleep script to allow NUT usage with sleep and
hibernation (bsc#1188990)
-------------------------------------------------------------------
Fri Jun 30 21:03:35 UTC 2023 - Arjen de Korte <suse+build@de-korte.org>

View File

@ -2,16 +2,16 @@
# Always stop nut before sleep, but do not initiate powerdown for hybrid-sleep.
if [ "$1" = pre ] && ( [ "$2" = hibernate ] || [ "$2" = hybrid-sleep ] ) ; then
/sbin/service upsd.service stop
/usr/bin/systemctl stop nut-server.service
fi
if [ "$1" = pre ] && [ "$2" = hibernate ] ; then
# FIXME: All hibernate quirks are called in parallel. To be on a safest side, we should initiate powerdown grace period when they terminate.
sleep 5
if test -n "$POWERDOWNFLAG" -a -f "$POWERDOWNFLAG" ; then
export UPSD_POWERDOWN_CONDITION=1
/etc/init.d/upsd try-powerdown
/usr/sbin/upsdrvctl shutdown
fi
fi
if [ "$1" = post ] && ( [ "$2" = hibernate ] || [ "$2" = hybrid-sleep ] ) ; then
/sbin/service upsd.service start
/usr/bin/systemctl start nut-server.service
fi