aboutsummaryrefslogtreecommitdiff
path: root/admin/muninlite/patches/002-hostname.patch
blob: a23284379f1ee78036e54f6158539e847c50bb32 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/muninlite.in
+++ b/muninlite.in
@@ -113,7 +113,7 @@ PLUGINS=$RES
 
 # ===== MAIN LOOP =====
 FUNCTIONS="list nodes config fetch version quit"
-HOSTNAME=$( { hostname -f || hostname || cat /proc/sys/kernel/hostname || echo "unknown"; } 2>/dev/null )
+HOSTNAME=$(/sbin/uci get "system.@system[0].hostname" 2>/dev/null || cat /proc/sys/kernel/hostname)
 echo "# munin node at $HOSTNAME"
 while read -r arg0 arg1
 do