# HG changeset patch
# User Keisuke MORI <kskmori@intellilink.co.jp>
# Date 1329820645 -32400
# Node ID 29944daa38672a112af5f607ad3a11e708ae9059
# Parent  2e7ce8c95c2c4b080d85eaceab10758557cce187
Low: hb_report: remove unnecessary sudo for root

diff -r 2e7ce8c95c2c -r 29944daa3867 hb_report/hb_report.in
--- a/hb_report/hb_report.in	Fri Feb 17 10:17:00 2012 +0100
+++ b/hb_report/hb_report.in	Tue Feb 21 19:37:25 2012 +0900
@@ -1213,7 +1213,7 @@
 if ! is_collector; then
 	# assume that only root can collect data
 	SUDO=""
-	if [ -z "$SSH_USER" -a `id -u` != 0 ] || [ "$SSH_USER" != root ]; then
+	if [ -z "$SSH_USER" -a `id -u` != 0 ] || [ -n "$SSH_USER" -a "$SSH_USER" != root ]; then
 		SUDO="sudo -u root -E"
 	fi
 	for node in $NODES; do
