[project @ peter@palfrader.org-20080706092931-m2wp14enpqeq7q2q]
authorPeter Palfrader <peter@palfrader.org>
Sun, 6 Jul 2008 09:29:31 +0000 (11:29 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sun, 6 Jul 2008 09:29:31 +0000 (11:29 +0200)
Comment dsa-update-apt-status

dsa-nagios-nrpe-config/dsa-update-apt-status

index 685f966..47c7e7a 100755 (executable)
@@ -3,9 +3,12 @@
 UPDATE_RUNS=3
 STATUS=/var/cache/dsa/nagios/apt
 
+# sleep if called non-interactively
 if [ -z "$TERM" -o "$TERM" = "dumb" ]; then
        sleep $(( $RANDOM % 7200 ))
 fi
+
+# run apt-get update, retry a few times if it fails
 count=0
 while [ "$count" -lt "$UPDATE_RUNS" ]; do
        apt-get update -qq
@@ -19,6 +22,7 @@ if [ "$count" -ge "$UPDATE_RUNS" ]; then
         exit 1
 fi
 
+# run the apt check itself
 tmp=`tempfile`
 trap "rm -f '$tmp'" exit
 /usr/share/dsa/apt-status-check --noupdate --timeout=600 > "$tmp"