002-hostname.patch 362 B

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