From 3fceeef3f010a0276b177dea74a05a9a49453dca Mon Sep 17 00:00:00 2001 From: "Galantsev, Dmitrii" Date: Wed, 20 Sep 2023 10:05:34 -0500 Subject: [PATCH] PACKAGE - Fix packaging Allow for configureLogrotate to fail without failing configure In previous commit I forgot to invert the check when switching "IS_SYSTEMD" and "!IS_SYSTEMD" if-else statements. Change-Id: I8eb8e7981c6353a2e60064eb3a6e35821ea2a0d0 Signed-off-by: Galantsev, Dmitrii [ROCm/rocm_smi_lib commit: b99867eb80cc7b6b47ae4b3e89a9e0ca9df0e4a7] --- projects/rocm-smi-lib/DEBIAN/postinst.in | 4 ++-- projects/rocm-smi-lib/RPM/post.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/rocm-smi-lib/DEBIAN/postinst.in b/projects/rocm-smi-lib/DEBIAN/postinst.in index 9e0fe4457c..641949f95a 100755 --- a/projects/rocm-smi-lib/DEBIAN/postinst.in +++ b/projects/rocm-smi-lib/DEBIAN/postinst.in @@ -56,7 +56,7 @@ EOF # to use daily cron jobs - see https://stackoverflow.com/a/69465677 if [ -d /run/systemd/system ]; then systemctl list-timers | grep -iq logrotate - if [ $? -ne 0 ]; then + if [ $? -eq 0 ]; then IS_SYSTEMD=1 fi fi @@ -107,7 +107,7 @@ do_ldconfig() { case "$1" in ( configure ) do_ldconfig - do_configureLogrotate + do_configureLogrotate || return 0 ;; ( abort-upgrade | abort-remove | abort-deconfigure ) echo "$1" diff --git a/projects/rocm-smi-lib/RPM/post.in b/projects/rocm-smi-lib/RPM/post.in index ccf1f814a5..d2bd016589 100755 --- a/projects/rocm-smi-lib/RPM/post.in +++ b/projects/rocm-smi-lib/RPM/post.in @@ -56,7 +56,7 @@ EOF # to use daily cron jobs - see https://stackoverflow.com/a/69465677 if [ -d /run/systemd/system ]; then systemctl list-timers | grep -iq logrotate - if [ $? -ne 0 ]; then + if [ $? -eq 0 ]; then IS_SYSTEMD=1 fi fi @@ -107,5 +107,5 @@ do_ldconfig() { # post install or upgrade, $i is 1 or 2 -> do these actions if [ "$1" -ge 1 ]; then do_ldconfig - do_configureLogrotate + do_configureLogrotate || return 0 fi