mirror of
https://github.com/munin-monitoring/muninlite.git
synced 2024-12-22 13:52:13 +01:00
hostname: fall back to /proc/sys/kernel/hostname (linux) if "hostname" is missing
This provides a usable alternative on OpenWrt.
This commit is contained in:
parent
0662cfc7e8
commit
a0d4d74f8d
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ PLUGINS=$(echo "$RES" | xargs -r -n 1 echo | sort | xargs echo)
|
|||
|
||||
# ===== MAIN LOOP =====
|
||||
FUNCTIONS="list nodes config fetch version quit"
|
||||
HOSTNAME=$(hostname -f 2>/dev/null || hostname)
|
||||
HOSTNAME=$( { hostname -f || hostname || cat /proc/sys/kernel/hostname || echo "unknown"; } 2>/dev/null )
|
||||
echo "# munin node at $HOSTNAME"
|
||||
while read -r arg0 arg1
|
||||
do
|
||||
|
|
Loading…
Reference in a new issue