From b5f67e9a8faa66e1ba1137cf4f2fefc957d372b1 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Fri, 19 Sep 2008 15:58:39 -0500 Subject: [PATCH] updated to released version 1.4 --- debian/changelog | 8 ++++++++ debian/config | 15 ++++++++++++++- debian/po/templates.pot | 4 ++-- debian/templates | 2 +- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index a6863cb..0eeeea5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +update-motd (1.4) intrepid; urgency=low + + * debian/config: validate that 1<=FREQ_IN_MIN<=59, at most 5 times before + defaulting to FREQ_IN_MIN=10 + * debian/templates: valid input is 1 to 59 minutes + + -- Dustin Kirkland Mon, 15 Sep 2008 21:37:44 -0500 + update-motd (1.3) intrepid; urgency=low * debian/config: only ask freq-in-min question if update-motd is enabled, diff --git a/debian/config b/debian/config index 4e289a5..84fd81c 100644 --- a/debian/config +++ b/debian/config @@ -26,6 +26,19 @@ db_go db_get $PACKAGE/enable RUN="${RET:-true}" if [ "$RUN" = "true" ]; then - db_input medium $PACKAGE/freq-in-min || true + TRIES=5 + for i in `seq 1 $TRIES`; do + db_input medium $PACKAGE/freq-in-min || true + db_go + db_get $PACKAGE/freq-in-min + FREQ_IN_MIN="${RET:-0}" + if [ "$FREQ_IN_MIN" -ge 1 ] && [ "$FREQ_IN_MIN" -le 59 ]; then + break + fi + if [ "$i" = "$TRIES" ]; then + # After a few tries, default to 10 + FREQ_IN_MIN=10 + fi + done fi db_go diff --git a/debian/po/templates.pot b/debian/po/templates.pot index 05f1747..444d09f 100644 --- a/debian/po/templates.pot +++ b/debian/po/templates.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: update-motd@packages.debian.org\n" -"POT-Creation-Date: 2008-08-22 11:36+0100\n" +"POT-Creation-Date: 2008-09-15 16:31-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,7 +33,7 @@ msgstr "" #. Type: string #. Description #: ../templates:2001 -msgid "Frequency should update-motd run (every N minutes):" +msgid "Frequency should update-motd run (every 1 to 59 minutes):" msgstr "" #. Type: string diff --git a/debian/templates b/debian/templates index c591625..201df50 100644 --- a/debian/templates +++ b/debian/templates @@ -8,7 +8,7 @@ _Description: Do you want update-motd to automatically update the system MOTD? Template: update-motd/freq-in-min Type: string Default: 10 -_Description: Frequency should update-motd run (every N minutes): +_Description: Frequency should update-motd run (every 1 to 59 minutes): The MOTD status is updated in a cron job, that can run as frequently as every minute, or as infrequently as desired. A higher frequency will negatively affect the overall system load. -- 2.30.2