1 Facter.add("apt_updates") do
2 confine :osfamily => 'Debian'
4 if File.executable?("/usr/lib/update-notifier/apt-check")
5 updates = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check 2>/dev/null')
6 Integer(updates.strip.split(';')[0])