[40network] Provide a hostname fallback function, in case there is no executable of this name

master
Dennis Schridde 2013-05-17 13:54:57 +02:00 committed by Harald Hoyer
parent 284d62da81
commit cbfe65c2fe
1 changed files with 4 additions and 0 deletions

View File

@ -366,3 +366,7 @@ linkup() {
&& wait_for_if_up $1 2>/dev/null
}

type hostname >/dev/null 2>&1 || \
hostname() {
cat /proc/sys/kernel/hostname
}