From 365511b7c92efb80dba4f98665972a3d6bd0032b9f9c3a65a3e87b398285d90b Mon Sep 17 00:00:00 2001 From: Antonio Teixeira Date: Mon, 10 Jul 2023 12:42:35 +0000 Subject: [PATCH] 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 --- nut.changes | 6 ++++++ nut.system-sleep | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/nut.changes b/nut.changes index e4795ea..4801232 100644 --- a/nut.changes +++ b/nut.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 6 20:29:12 UTC 2023 - Antonio Teixeira + +- 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 diff --git a/nut.system-sleep b/nut.system-sleep index e96ae72..caeb4fb 100644 --- a/nut.system-sleep +++ b/nut.system-sleep @@ -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