diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2019-08-22 09:03:14 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2019-08-22 09:10:16 +0200 |
commit | 489da40d56075efaa28bfdcfb7b02b3bcc222323 (patch) | |
tree | a2a013b90a28b424534a2bdabf3731eeac7f83e2 | |
parent | 1aa26d01a9654bdb73ca54d4bb34ff8855723a93 (diff) | |
download | apt-489da40d56075efaa28bfdcfb7b02b3bcc222323.tar.gz |
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
-rwxr-xr-x | debian/apt.systemd.daily | 16 |
1 files changed, 8 insertions, 8 deletions
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 |