Blame 0061-40network-Provide-a-hostname-fallback-function-in-ca.patch

Harald Hoyer 75f812
From cbfe65c2fe599b7b5eb6a144332e84c2290869ea Mon Sep 17 00:00:00 2001
Harald Hoyer 75f812
From: Dennis Schridde <devurandom@gmx.net>
Harald Hoyer 75f812
Date: Fri, 17 May 2013 13:54:57 +0200
Harald Hoyer 75f812
Subject: [PATCH] [40network] Provide a hostname fallback function, in case
Harald Hoyer 75f812
 there is no executable of this name
Harald Hoyer 75f812
Harald Hoyer 75f812
---
Harald Hoyer 75f812
 modules.d/40network/net-lib.sh | 4 ++++
Harald Hoyer 75f812
 1 file changed, 4 insertions(+)
Harald Hoyer 75f812
Harald Hoyer 75f812
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
Harald Hoyer 75f812
index f9b461b..d62d5ad 100644
Harald Hoyer 75f812
--- a/modules.d/40network/net-lib.sh
Harald Hoyer 75f812
+++ b/modules.d/40network/net-lib.sh
Harald Hoyer 75f812
@@ -366,3 +366,7 @@ linkup() {
Harald Hoyer 75f812
      && wait_for_if_up $1 2>/dev/null
Harald Hoyer 75f812
 }
Harald Hoyer 75f812
 
Harald Hoyer 75f812
+type hostname >/dev/null 2>&1 || \
Harald Hoyer 75f812
+hostname() {
Harald Hoyer 75f812
+	cat /proc/sys/kernel/hostname
Harald Hoyer 75f812
+}