]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
[40network] Provide a hostname fallback function, in case there is no executable...
authorDennis Schridde <devurandom@gmx.net>
Fri, 17 May 2013 11:54:57 +0000 (13:54 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 29 May 2013 09:32:57 +0000 (11:32 +0200)
modules.d/40network/net-lib.sh

index f9b461bbff75c247beb4eed71f690ad65bff7530..d62d5adcbf1293c978b437ce6ca5b673f915f2ea 100644 (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
+}