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