From 757a8acec55d0bb2caaf7ab254d80115ab1223dd Mon Sep 17 00:00:00 2001
From: Peter Palfrader <peter@palfrader.org>
Date: Wed, 13 Sep 2006 06:38:43 +0000
Subject: also echo host, if defined

git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@183 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
---
 munin/ups_ | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/munin/ups_ b/munin/ups_
index 973203f..0237311 100755
--- a/munin/ups_
+++ b/munin/ups_
@@ -39,7 +39,6 @@ fi
 
 function voltages() {
 	if [ "$1" = "config" ]; then
-
 		echo "graph_title $UPS voltages"
 		echo "graph_args --base 1000 -l 0"
 		echo "graph_vlabel Volt"
@@ -147,7 +146,12 @@ function temperature() {
 	fi
 }
 
-[ "$1" = "config" ] && echo "graph_category sensors"
+if [ "$1" = "config" ]; then
+	echo "graph_category sensors"
+	if [ -n "$host" ]; then
+		echo "host_name $host"
+	fi
+fi
 
 case "$FUNCTION" in
 	voltages)
-- 
cgit v1.2.3