From e005c961d40307f6253670c02890c427ca5fc58f Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 22 Jul 2009 11:34:30 +0200 Subject: [PATCH] Introduce -f switch --- dsa-nagios-checks/debian/changelog | 3 ++- dsa-nagios-checks/sbin/dsa-update-apt-status | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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 -- 2.20.1