From 9b339e14131cc8a7a4281f680bd8b6739ad98187 Mon Sep 17 00:00:00 2001 From: reddog Date: Thu, 30 Jun 2011 17:54:42 +0000 Subject: [PATCH] new hostnames for tinc - untested! --- root_file_system/default/etc/tincstart.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/root_file_system/default/etc/tincstart.sh b/root_file_system/default/etc/tincstart.sh index 5ecf1bb..b741eab 100755 --- a/root_file_system/default/etc/tincstart.sh +++ b/root_file_system/default/etc/tincstart.sh @@ -16,7 +16,11 @@ then if [ "$SERVER" == "no" ] then - hostname=$(ifconfig br-mesh | grep HWaddr | awk '{ print $5 }'|sed -e 's/://g') + hostname=$(cat /proc/sys/kernel/hostname) + + if [ "$hostname" == "" ] + hostname=$(ifconfig br-mesh | grep HWaddr | awk '{ print $5 }'|sed -e 's/://g') + fi if [ "$hostname" == "" ] then