|
@@ -14,6 +14,9 @@
|
|
|
# Dir::Cache::Archive "archives/";
|
|
# Dir::Cache::Archive "archives/";
|
|
|
# - Set package archive directory
|
|
# - Set package archive directory
|
|
|
#
|
|
#
|
|
|
|
|
+# APT::Periodic::Enable "1";
|
|
|
|
|
+# - Enable the update/upgrade script (0=disable)
|
|
|
|
|
+#
|
|
|
# APT::Periodic::BackupArchiveInterval "0";
|
|
# APT::Periodic::BackupArchiveInterval "0";
|
|
|
# - Backup after n-days if archive contents changed.(0=disable)
|
|
# - Backup after n-days if archive contents changed.(0=disable)
|
|
|
#
|
|
#
|
|
@@ -46,7 +49,10 @@
|
|
|
#
|
|
#
|
|
|
# APT::Periodic::Download-Upgradeable-Packages "0";
|
|
# APT::Periodic::Download-Upgradeable-Packages "0";
|
|
|
# - Do "apt-get upgrade --download-only" every n-days (0=disable)
|
|
# - Do "apt-get upgrade --download-only" every n-days (0=disable)
|
|
|
-#
|
|
|
|
|
|
|
+#
|
|
|
|
|
+# APT::Periodic::Download-Upgradeable-Packages-Debdelta "1";
|
|
|
|
|
+# - Use debdelta-upgrade to download updates if available (0=disable)
|
|
|
|
|
+#
|
|
|
# APT::Periodic::Unattended-Upgrade "0";
|
|
# APT::Periodic::Unattended-Upgrade "0";
|
|
|
# - Run the "unattended-upgrade" security upgrade script
|
|
# - Run the "unattended-upgrade" security upgrade script
|
|
|
# every n-days (0=disabled)
|
|
# every n-days (0=disabled)
|
|
@@ -319,12 +325,18 @@ if ! which apt-config >/dev/null ; then
|
|
|
exit 0
|
|
exit 0
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
|
|
+# check if the user really wants to do something
|
|
|
|
|
+AutoAptEnable=1 # default is yes
|
|
|
|
|
+eval $(apt-config shell AutoAptEnable APT::Periodic::Enable)
|
|
|
|
|
+
|
|
|
|
|
+if [ $AutoAptEnable -eq 0 ]; then
|
|
|
|
|
+ exit 0
|
|
|
|
|
+fi
|
|
|
|
|
+
|
|
|
# Set VERBOSE mode from apt-config (or inherit from environment)
|
|
# Set VERBOSE mode from apt-config (or inherit from environment)
|
|
|
|
|
+VERBOSE=0
|
|
|
eval $(apt-config shell VERBOSE APT::Periodic::Verbose)
|
|
eval $(apt-config shell VERBOSE APT::Periodic::Verbose)
|
|
|
debug_echo "verbose level $VERBOSE"
|
|
debug_echo "verbose level $VERBOSE"
|
|
|
-if [ -z "$VERBOSE" ]; then
|
|
|
|
|
- VERBOSE="0"
|
|
|
|
|
-fi
|
|
|
|
|
if [ "$VERBOSE" -le 2 ]; then
|
|
if [ "$VERBOSE" -le 2 ]; then
|
|
|
# quiet for 0,1,2
|
|
# quiet for 0,1,2
|
|
|
XSTDOUT=">/dev/null"
|
|
XSTDOUT=">/dev/null"
|
|
@@ -386,6 +398,9 @@ eval $(apt-config shell AutocleanInterval APT::Periodic::AutocleanInterval)
|
|
|
BackupArchiveInterval=0
|
|
BackupArchiveInterval=0
|
|
|
eval $(apt-config shell BackupArchiveInterval APT::Periodic::BackupArchiveInterval)
|
|
eval $(apt-config shell BackupArchiveInterval APT::Periodic::BackupArchiveInterval)
|
|
|
|
|
|
|
|
|
|
+Debdelta=1
|
|
|
|
|
+eval $(apt-config shell Debdelta APT::Periodic::Download-Upgradeable-Packages-Debdelta)
|
|
|
|
|
+
|
|
|
# check if we actually have to do anything
|
|
# check if we actually have to do anything
|
|
|
if [ $UpdateInterval -eq 0 ] &&
|
|
if [ $UpdateInterval -eq 0 ] &&
|
|
|
[ $DownloadUpgradeableInterval -eq 0 ] &&
|
|
[ $DownloadUpgradeableInterval -eq 0 ] &&
|
|
@@ -429,6 +444,9 @@ fi
|
|
|
# download all upgradeable packages (if it is requested)
|
|
# download all upgradeable packages (if it is requested)
|
|
|
DOWNLOAD_UPGRADEABLE_STAMP=/var/lib/apt/periodic/download-upgradeable-stamp
|
|
DOWNLOAD_UPGRADEABLE_STAMP=/var/lib/apt/periodic/download-upgradeable-stamp
|
|
|
if [ $UPDATED -eq 1 ] && check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $DownloadUpgradeableInterval; then
|
|
if [ $UPDATED -eq 1 ] && check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $DownloadUpgradeableInterval; then
|
|
|
|
|
+ if [ $Debdelta -eq 1 ]; then
|
|
|
|
|
+ debdelta-upgrade >/dev/null 2>&1 || true
|
|
|
|
|
+ fi
|
|
|
if eval apt-get $XAPTOPT -y -d dist-upgrade $XSTDERR; then
|
|
if eval apt-get $XAPTOPT -y -d dist-upgrade $XSTDERR; then
|
|
|
update_stamp $DOWNLOAD_UPGRADEABLE_STAMP
|
|
update_stamp $DOWNLOAD_UPGRADEABLE_STAMP
|
|
|
debug_echo "download upgradable (success)"
|
|
debug_echo "download upgradable (success)"
|