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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 modules.d/40network/net-lib.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index f006874..7e8b2e5 100644
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -422,3 +422,8 @@ net_add_parse_vars() {
 		[ -f /tmp/40network.parse.finished."${jobid}" ]
 	EOF
 }
+
+type hostname >/dev/null 2>&1 || \
+hostname() {
+	cat /proc/sys/kernel/hostname
+}
-- 
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux