From: Dennis Schridde Date: Fri, 17 May 2013 11:54:57 +0000 (+0200) Subject: [40network] Provide a hostname fallback function, in case there is no executable... X-Git-Tag: 028~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbfe65c2fe599b7b5eb6a144332e84c2290869ea;p=thirdparty%2Fdracut.git [40network] Provide a hostname fallback function, in case there is no executable of this name --- diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh index f9b461bbf..d62d5adcb 100644 --- a/modules.d/40network/net-lib.sh +++ b/modules.d/40network/net-lib.sh @@ -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 +}