Do not print debug messages by default
authorBryn M. Reeves <bmr@redhat.com>
Fri, 18 Jan 2013 17:12:04 +0000 (17:12 +0000)
committerBryn M. Reeves <bmr@redhat.com>
Fri, 18 Jan 2013 17:12:04 +0000 (17:12 +0000)
Users can select debug output by setting the BA_DEBUG environment
variable:

  [root@rhel6-vm1 ~]# blkdevalias deletedisk DSK1
  Removing wwid map disk "DSK1":                                  [  OK  ]
  [root@rhel6-vm1 ~]# BA_DEBUG="yes" blkdevalias createdisk DSK1 /dev/sda
  ba_createdisk: DEV="/dev/sda" ALIAS="DSK1"
  ba_scsi_id: getting ID for device /dev/sda
  ba_scsi_id: calling "/sbin/scsi_id -g -u /dev/sda"
  ba_createdisk: WWID="0QEMU_QEMU_HARDDISK_drive-scsi0-0-0"
  ba_get_partnum: /dev/sda
  ba_createdisk: PART="0"
  ba_add_wwid_mapping: WWID="0QEMU_QEMU_HARDDISK_drive-scsi0-0-0" ALIAS="DSK1" TYPE="sd" PART="0"

blkdevalias

index ee6f96e..202840f 100755 (executable)
@@ -26,7 +26,8 @@ declare -A TYPEMAP
 declare -A PARTMAP
 
 
-BA_DEBUG=yes
+# To enable debug output set the BA_DEBUG environment variable to "yes".
+#BA_DEBUG="yes"
 BA_DEFAULT_USER="oracle"
 BA_DEFAULT_GROUP="oracle"
 BA_CONF_PATH="/etc/blkdevalias"