[Logcheck-commits] Hannes von Haugwitz: src/logcheck: fixed stream redirection

Gerfried Fuchs alfie at alioth.debian.org
Wed May 12 00:11:11 UTC 2010


Module: logcheck
Branch: lenny-backports
Commit: 17473f8d5d144c82bdae21a56cfe3d78b3554db1
URL:    http://git.debian.org/?p=logcheck/logcheck.git;a=commit;h=17473f8d5d144c82bdae21a56cfe3d78b3554db1

Author: Hannes von Haugwitz <hannes at vonhaugwitz.com>
Date:   Tue Apr 13 09:51:41 2010 +0200

src/logcheck: fixed stream redirection

---

 debian/changelog |    2 ++
 src/logcheck     |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5cb2323..79eaac1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,8 @@ logcheck (1.3.8) UNRELEASED; urgency=low
   * src/logcheck:
     - look for {header,footer}.txt in $RULEDIR, thanks to Kerstin Puschke
     - cd to $STATEDIR before cleaning up temp dir, thanks to Kerstin Puschke
+    - fixed stream redirection of hostname command,
+      thanks to Bob Proulx (see #574858)
   * ignore.d.server/dnsmasq:
     - adjusted rule to also match '-dhcp' suffix in dhcp subsystem messages,
       thanks to Michał Sawicz
diff --git a/src/logcheck b/src/logcheck
index c549053..6cfd0f7 100755
--- a/src/logcheck
+++ b/src/logcheck
@@ -529,9 +529,9 @@ fi
 
 # Hostname either fully qualified or not.
 if [ "$FQDN" -eq 1 ]; then
-        HOSTNAME="$(hostname --fqdn)" > /dev/null 2>&1
+        HOSTNAME="$(hostname --fqdn 2>/dev/null)"
 else
-        HOSTNAME="$(hostname --short)" > /dev/null 2>&1
+        HOSTNAME="$(hostname --short 2>/dev/null)"
 fi
 
 # Now check for the other options




More information about the Logcheck-commits mailing list