From: Peter Palfrader Date: Wed, 22 Jul 2009 09:34:30 +0000 (+0200) Subject: Introduce -f switch X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=e005c961d40307f6253670c02890c427ca5fc58f;p=mirror%2Fdsa-nagios.git Introduce -f switch --- diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index 0ab7fb2..ab4a08e 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -2,8 +2,9 @@ dsa-nagios-checks (80) stable; urgency=low * dsa-check-packages: In the short overview say "obs/loc" instead of just "obs" for local or obsolete packages. + * dsa-update-apt-status: Introduce -f switch. - -- Peter Palfrader Wed, 22 Jul 2009 11:26:40 +0200 + -- Peter Palfrader Wed, 22 Jul 2009 11:34:15 +0200 dsa-nagios-checks (79) stable; urgency=low diff --git a/dsa-nagios-checks/sbin/dsa-update-apt-status b/dsa-nagios-checks/sbin/dsa-update-apt-status index 3e3acef..2c6347f 100755 --- a/dsa-nagios-checks/sbin/dsa-update-apt-status +++ b/dsa-nagios-checks/sbin/dsa-update-apt-status @@ -29,8 +29,10 @@ run_required() { return $norun } -# do stuff only when required -run_required || exit +# do stuff only when required, or when asked to +if [ "${1:-""}" != "-f" ] ; then + run_required || exit +fi # sleep if called non-interactively if [ -z "$TERM" -o "$TERM" = "dumb" ]; then