martin f. krafft: Do not output warning when run from cron and no arrays are found

Martin F. Krafft madduck at alioth.debian.org
Fri Apr 11 13:11:33 UTC 2008


Module: mdadm
Branch: master
Commit: 025745133ca71b2b652541d43c9a91e01ac80236
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git/?a=commit;h=025745133ca71b2b652541d43c9a91e01ac80236

Author: martin f. krafft <madduck at madduck.net>
Date:   Fri Apr 11 13:03:52 2008 +0200

Do not output warning when run from cron and no arrays are found

(closes: #474542).

---

 debian/changelog  |    2 ++
 debian/checkarray |    6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 60619bd..09dc85b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ mdadm (2.6.4-2) unstable; urgency=low
     * Vietnamese. Closes: #467118
   * Fixed bashism in mdadm-raid init.d script; thanks to Raphael Geisser
     (closes: #471874).
+  * Do not output warning when run from cron and no arrays are found
+    (closes: #474542).
 
  -- martin f. krafft <madduck at debian.org>  Fri, 11 Apr 2008 10:48:45 +0200
 
diff --git a/debian/checkarray b/debian/checkarray
index 29b2a10..c2bc324 100644
--- a/debian/checkarray
+++ b/debian/checkarray
@@ -109,8 +109,10 @@ if [ ! -d /sys/block ]; then
 fi
 
 if [ -z "$(ls /sys/block/md* 2>/dev/null)" ]; then
-  [ $quiet -lt 2 ] && echo "$PROGNAME: W: no active MD arrays found." >&2
-  [ $quiet -lt 2 ] && echo "$PROGNAME: W: (maybe uninstall the mdadm package?)" >&2
+  if [ $quiet -lt 2 ] && [ $cron != 1 ]; then
+    echo "$PROGNAME: W: no active MD arrays found." >&2
+    echo "$PROGNAME: W: (maybe uninstall the mdadm package?)" >&2
+  fi
   exit 5
 fi
 




More information about the pkg-mdadm-commits mailing list