RPM
{
// Hold (do not update) a list with pkgs:
// Hold { "k_deflt"; "sane"; };
Hold { "kdebase3-SuSE"; "perl-spamassassin"; "tightvnc";}
// Leave list empty to disable
Ignore {"kdenetwork3-vnc"; "sane"; "tightvnc-server"; "xsane"; "python-imaging"; "scribus"; "scribus-i18n-de"; "scribus-templates"; };
}
[[root@boston|cron.d]]# cat /usr/local/bin/aptcron.sh
#!/bin/sh
TMP=/tmp/apt_updates_check$$
ret=0
VERBOSE=1
export LANG=
apt-get -q update > $TMP
if [$? -ne 0 ]; then
echo "ERROR apt-get update"
echo ""
cat $TMP
rm -f $TMP
exit 1
fi
apt-get -q -s upgrade > $TMP
cat $TMP | grep -q "packages will be upgraded"
if [$? -eq 0 ]; then
echo "Updates verfuegbar !"
echo ""
apt-get upgrade --download-only -y
echo ""
cat $TMP
ret=1
else
if [$VERBOSE -ne 0 ]; then
echo "Setze 'VERBOSE=0'"
echo ""
echo "keine Updates verfuegbar"
echo ""
cat $TMP
fi
fi
rm -f $TMP
exit $ret
[[root@boston|cron.d]]# cat /etc/cron.d/apt
42 4 * * * root /usr/local/bin/aptcron.sh