[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: unattended-upgrades



On Monday 20 October 2014 20:58:48 Andrei POPESCU wrote:
> On Lu, 20 oct 14, 20:39:59, Chris wrote:
> > Yes, I do have anacron installed because I thought that might be the
> > problem.
> 
> If you have anacron installed the jobs will be run by anacron, but you
> already have proven that daily cronjobs work, so that's probably a dead
> end.
> 
> > How would you suggest I run it manually, there are lots of different
> > threads on how to do that.
> 
> Not being aware of any other threads about it I'd do:
> 
>     sh -x /etc/cron.daily/apt
> 
> You might want to capture the output and possibly paste it here.
> 
> Kind regards,
> Andrei

Hi Andrei,

ok here is the result (after quite a wait, it seems to have some sleep-phases 
;-)
the file was written at 21:12, AND unattended-upgrades.log file reports it 
having run and installed the packages that came 
across in the last few days. So why is it not being run from cron.daily 
although it is there and cron is running??

$ls -lah |grep apt
-rw-r--r--   1 root root  15K Sep 23 08:20 apt 

$sh -x /etc/cron.daily/apt
+ test -r /var/lib/apt/extended_states
+ cd /var/backups
+ cmp -s apt.extended_states.0 /var/lib/apt/extended_states
+ cp -p /var/lib/apt/extended_states apt.extended_states
+ savelog -c 7 apt.extended_states
+ which apt-config
+ AutoAptEnable=1
+ apt-config shell AutoAptEnable APT::Periodic::Enable
+ eval
+ [ 1 -eq 0 ]
+ VERBOSE=0
+ apt-config shell VERBOSE APT::Periodic::Verbose
+ eval
+ debug_echo verbose level 0
+ [ 0 -ge 1 ]
+ [ 0 -le 2 ]
+ XSTDOUT=>/dev/null
+ XSTDERR=2>/dev/null
+ XAPTOPT=-qq
+ XUUPOPT=
+ [ 0 -ge 3 ]
+ check_power
+ which on_ac_power
+ return 0
+ which apt-get
+ eval apt-get check -f -qq 2>/dev/null
+ apt-get check -f -qq
+ date +%s
+ now=1413917652
+ UpdateInterval=0
+ apt-config shell UpdateInterval APT::Periodic::Update-Package-Lists
+ eval UpdateInterval='1'
+ UpdateInterval=1
+ DownloadUpgradeableInterval=0
+ apt-config shell DownloadUpgradeableInterval APT::Periodic::Download-
Upgradeable-Packages
+ eval
+ UnattendedUpgradeInterval=0
+ apt-config shell UnattendedUpgradeInterval APT::Periodic::Unattended-Upgrade
+ eval UnattendedUpgradeInterval='1'
+ UnattendedUpgradeInterval=1
+ AutocleanInterval=0
+ apt-config shell AutocleanInterval APT::Periodic::AutocleanInterval
+ eval
+ BackupArchiveInterval=0
+ apt-config shell BackupArchiveInterval APT::Periodic::BackupArchiveInterval
+ eval
+ Debdelta=1
+ apt-config shell Debdelta APT::Periodic::Download-Upgradeable-Packages-
Debdelta
+ eval
+ [ 1 -eq 0 ]
+ do_cache_backup 0
+ BackupArchiveInterval=0
+ [ 0 -eq 0 ]
+ return
+ random_sleep
+ RandomSleep=1800
+ apt-config shell RandomSleep APT::Periodic::RandomSleep
+ eval
+ [ 1800 -eq 0 ]
+ [ -z  ]
+ dd if=/dev/urandom count=1
+ cksum
+ cut -c1-5
+ RANDOM=13689
+ TIME=1089
+ debug_echo sleeping for 1089 seconds
+ [ 0 -ge 1 ]
+ sleep 1089
+ check_power
+ which on_ac_power
+ return 0
+ [ -r /etc/default/locale ]
+ . /etc/default/locale
+ export LANG LANGUAGE LC_MESSAGES LC_ALL
+ UPDATED=0
+ UPDATE_STAMP=/var/lib/apt/periodic/update-stamp
+ check_stamp /var/lib/apt/periodic/update-stamp 1
+ stamp=/var/lib/apt/periodic/update-stamp
+ interval=1
+ [ 1 -eq 0 ]
+ [ ! -f /var/lib/apt/periodic/update-stamp ]
+ debug_echo check_stamp: missing time stamp file: 
/var/lib/apt/periodic/update-stamp.
+ [ 0 -ge 1 ]
+ return 0
+ eval apt-get -qq -y update 2>/dev/null
+ apt-get -qq -y update
+ debug_echo download updated metadata (success).
+ [ 0 -ge 1 ]
+ which dbus-send
+ debug_echo dbus signal not send (command not available)
+ [ 0 -ge 1 ]
+ update_stamp /var/lib/apt/periodic/update-stamp
+ stamp=/var/lib/apt/periodic/update-stamp
+ touch /var/lib/apt/periodic/update-stamp
+ UPDATED=1
+ DOWNLOAD_UPGRADEABLE_STAMP=/var/lib/apt/periodic/download-upgradeable-stamp
+ [ 1 -eq 1 ]
+ check_stamp /var/lib/apt/periodic/download-upgradeable-stamp 0
+ stamp=/var/lib/apt/periodic/download-upgradeable-stamp
+ interval=0
+ [ 0 -eq 0 ]
+ debug_echo check_stamp: interval=0
+ [ 0 -ge 1 ]
+ return 1
+ debug_echo download upgradable (not run)
+ [ 0 -ge 1 ]
+ UPGRADE_STAMP=/var/lib/apt/periodic/upgrade-stamp
+ which unattended-upgrade
+ check_stamp /var/lib/apt/periodic/upgrade-stamp 1
+ stamp=/var/lib/apt/periodic/upgrade-stamp
+ interval=1
+ [ 1 -eq 0 ]
+ [ ! -f /var/lib/apt/periodic/upgrade-stamp ]
+ debug_echo check_stamp: missing time stamp file: 
/var/lib/apt/periodic/upgrade-stamp.
+ [ 0 -ge 1 ]
+ return 0
+ unattended-upgrade
+ update_stamp /var/lib/apt/periodic/upgrade-stamp
+ stamp=/var/lib/apt/periodic/upgrade-stamp
+ touch /var/lib/apt/periodic/upgrade-stamp
+ debug_echo unattended-upgrade (success)
+ [ 0 -ge 1 ]
+ AUTOCLEAN_STAMP=/var/lib/apt/periodic/autoclean-stamp
+ check_stamp /var/lib/apt/periodic/autoclean-stamp 0
+ stamp=/var/lib/apt/periodic/autoclean-stamp
+ interval=0
+ [ 0 -eq 0 ]
+ debug_echo check_stamp: interval=0
+ [ 0 -ge 1 ]
+ return 1
+ debug_echo autoclean (not run)
+ [ 0 -ge 1 ]
+ check_size_constraints
+ MaxAge=0
+ apt-config shell MaxAge APT::Archives::MaxAge
+ eval
+ apt-config shell MaxAge APT::Periodic::MaxAge
+ eval
+ MinAge=2
+ apt-config shell MinAge APT::Archives::MinAge
+ eval
+ apt-config shell MinAge APT::Periodic::MinAge
+ eval
+ MaxSize=0
+ apt-config shell MaxSize APT::Archives::MaxSize
+ eval
+ apt-config shell MaxSize APT::Periodic::MaxSize
+ eval
+ Cache=/var/cache/apt/archives/
+ apt-config shell Cache Dir::Cache::archives/d
+ eval Cache='/var/cache/apt/archives/'
+ Cache=/var/cache/apt/archives/
+ [ -z /var/cache/apt/archives/ ]
+ [ ! 0 -eq 0 ]
+ [ ! 0 -eq 0 ]
+ debug_echo skip aging since MaxAge is 0
+ [ 0 -ge 1 ]
+ [ ! 0 -eq 0 ]

-- 
Chris


Reply to: