~ubuntu-core-dev/apt/ubuntu

« back to all changes in this revision

Viewing changes to debian/apt.cron.daily

* merged the apt-breaks-iwj branch
* pulled in the other remaining ubuntu changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
#  "APT::Periodic::AutocleanInterval"
15
15
#  - Do "apt-get autoclean" every n-days (0=disable)
16
16
#
 
17
#  "APT::Periodic::Unattended-Upgrade"
 
18
#  - Run the "unattended-upgrade" security upgrade script 
 
19
#    every n-days (0=disabled)
 
20
#    Requires the package "unattended-upgrades" and will write
 
21
#    a log in /var/log/unattended-upgrades
 
22
17
23
#  "APT::Archives::MaxAge",
18
24
#  - Set maximum allowed age of a cache package file. If a cache 
19
25
#    package file is older it is deleted (0=disable)
148
154
AutocleanInterval=$DownloadUpgradeableInterval
149
155
eval $(apt-config shell AutocleanInterval APT::Periodic::Autoclean)
150
156
 
 
157
UnattendedUpgradeInterval=0
 
158
eval $(apt-config shell UnattendedUpgradeInterval APT::Periodic::Unattended-Upgrade)
 
159
 
 
160
 
151
161
# laptop check, on_ac_power returns:
152
162
#       0 (true)    System is on mains power
153
163
#       1 (false)   System is not on mains power
182
192
    update_stamp $AUTOCLEAN_STAMP
183
193
fi
184
194
 
 
195
UPGRADE_STAMP=/var/lib/apt/periodic/upgrade-stamp
 
196
if check_stamp $UPGRADE_STAMP $UnattendedUpgradeInterval; then
 
197
    unattended-upgrade
 
198
    update_stamp $UPGRADE_STAMP
 
199
fi
 
200
 
185
201
# check cache size 
186
202
check_size_constraints