Allow disabling debug output
authorColin Watson <cjwatson@debian.org>
Thu, 19 Jan 2017 21:16:33 +0000 (21:16 +0000)
committerColin Watson <cjwatson@debian.org>
Thu, 19 Jan 2017 21:16:36 +0000 (21:16 +0000)
Disable debugging if OS_PROBER_DISABLE_DEBUG is set (thanks, Hedayat
Vatankhah; closes: #698598).

common.sh
debian/changelog
os-probes/mounted/powerpc/20macosx

index c1834ef..c6d3424 100644 (file)
--- a/common.sh
+++ b/common.sh
@@ -71,7 +71,9 @@ warn() {
 }
 
 debug() {
-  log "debug: $@"
+  if [ -z "$OS_PROBER_DISABLE_DEBUG" ]; then
+    log "debug: $@"
+  fi
 }
 
 result () {
index 921eb18..f93db02 100644 (file)
@@ -19,6 +19,8 @@ os-prober (1.72) UNRELEASED; urgency=medium
     Vatankhah; closes: #698733).
   * Make the yaboot parser more tolerant about the syntax of "append"
     options (thanks, Hedayat Vatankhah; closes: #674561).
+  * Disable debugging if OS_PROBER_DISABLE_DEBUG is set (thanks, Hedayat
+    Vatankhah; closes: #698598).
 
  -- Colin Watson <cjwatson@debian.org>  Sat, 31 Dec 2016 17:11:49 +0000
 
index dd4207f..2fc7e85 100755 (executable)
@@ -7,7 +7,9 @@ mpoint="$2"
 type="$3"
 
 debug() {
-  logger -t macosx-prober "debug: $@"
+  if [ -z "$OS_PROBER_DISABLE_DEBUG" ]; then
+    logger -t macosx-prober "debug: $@"
+  fi
 }
 
 # Weed out stuff that doesn't apply to us