From 489da40d56075efaa28bfdcfb7b02b3bcc222323 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 22 Aug 2019 09:03:14 +0200 Subject: apt.systemd.daily: Do not numerically check if intervals equal 0 Commit 1d9e29c9e2a5591b42a99a721b901fc003ed9149 added support for suffixes to to intervals, but did not adjust the code to actually support them by replacing -eq with =. LP: #1840995 --- debian/apt.systemd.daily | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'debian/apt.systemd.daily') diff --git a/debian/apt.systemd.daily b/debian/apt.systemd.daily index c6fbca03f..25339054e 100755 --- a/debian/apt.systemd.daily +++ b/debian/apt.systemd.daily @@ -84,7 +84,7 @@ check_stamp() return 0 fi - if [ "$interval" -eq 0 ]; then + if [ "$interval" = 0 ]; then debug_echo "check_stamp: interval=0" # treat as no time has passed return 1 @@ -237,7 +237,7 @@ do_cache_backup() BackupArchiveInterval="$1" if [ "$BackupArchiveInterval" = always ]; then : - elif [ "$BackupArchiveInterval" -eq 0 ]; then + elif [ "$BackupArchiveInterval" = 0 ]; then return fi @@ -415,12 +415,12 @@ if [ $UpdateInterval = always ] || [ $AutocleanInterval = always ] || [ $CleanInterval = always ] ; then : -elif [ $UpdateInterval -eq 0 ] && - [ $DownloadUpgradeableInterval -eq 0 ] && - [ $UnattendedUpgradeInterval -eq 0 ] && - [ $BackupArchiveInterval -eq 0 ] && - [ $AutocleanInterval -eq 0 ] && - [ $CleanInterval -eq 0 ] ; then +elif [ $UpdateInterval = 0 ] && + [ $DownloadUpgradeableInterval = 0 ] && + [ $UnattendedUpgradeInterval = 0 ] && + [ $BackupArchiveInterval = 0 ] && + [ $AutocleanInterval = 0 ] && + [ $CleanInterval = 0 ] ; then # check cache size check_size_constraints -- cgit v1.2.3