[DRBD-user] [PATCH 2/4] drbd.ocf: Get rid of spiritual empty lines in output

Vladislav Bogdanov bubble at hoster-ok.com
Mon Feb 29 16:10:36 CET 2016

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Feb 29 11:26:08 node1 crmd[1649]:   notice: node1-storage-drbd_monitor_10000:292 [ \n ]
Feb 29 11:36:22 node1 crmd[1649]:   notice: node1-storage-drbd_monitor_10000:292 [ \n ]
Feb 29 11:36:22 node1 crmd[1649]:   notice: node1-storage-drbd_monitor_10000:398 [ \n ]
Feb 29 11:55:32 node1 crmd[1649]:   notice: node1-storage-drbd_monitor_10000:398 [ \n ]
Feb 29 12:31:42 node1 crmd[1583]:   notice: node1-storage-drbd_monitor_10000:291 [ \n ]
Feb 29 12:41:48 node1 crmd[1583]:   notice: node1-storage-drbd_monitor_10000:291 [ \n ]
Feb 29 12:41:48 node1 crmd[1583]:   notice: node1-storage-drbd_monitor_10000:381 [ \n ]
---
 scripts/drbd.ocf |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf
index 5c87d32..b6e865f 100755
--- a/scripts/drbd.ocf
+++ b/scripts/drbd.ocf
@@ -294,7 +294,7 @@ do_cmd() {
 		ocf_log debug "$DRBD_RESOURCE: Command output: $cmd_out"
 	fi
 
-	echo "$cmd_out"
+	[ -n "$cmd_out" ] && echo "$cmd_out"
 
 	return $ret
 }
-- 
1.7.1




More information about the drbd-user mailing list