Files
packages/admin/muninlite/patches/002-hostname.patch
T
Lars Kruse 7b2b37c4a1 muninlite: update to 2.0.1
* follow upstream ressources to github
* rename /usr/sbin/munin-node to /usr/sbin/muninlite
  (following the chane of upstream)
* change plugin directory from /usr/sbin/munin-node-plugin.d/
  to /etc/munin/plugins (compatible to upstream / munin-node)
* all patches (except one OpenWrt-specific patch) were merged
  upstream

Signed-off-by: Lars Kruse <devel@sumpfralle.de>
2020-04-14 17:12:47 +02:00

12 lines
419 B
Diff

--- 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