packages/admin/muninlite/patches/002-hostname.patch
florian 4fb74d93d9 [package] muninlite: update to Version 1.0.4 (#8877)
Signed-off-by: Andreas Oeldenberger <Andreas.Oeldenberger@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@25587 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-02-19 13:04:01 +00:00

12 lines
362 B
Diff

--- a/munin-node.in
+++ b/munin-node.in
@@ -113,7 +113,7 @@ PLUGINS=$RES
# ===== MAIN LOOP =====
FUNCTIONS="list nodes config fetch version quit"
-HOSTNAME=$(hostname -f 2>/dev/null || hostname)
+HOSTNAME=$(/sbin/uci get "system.@system[0].hostname" 2>/dev/null || cat /proc/sys/kernel/hostname)
echo "# munin node at $HOSTNAME"
while read arg0 arg1
do