You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
1022 B

From 6b9732c8851c5466f2a363d88b5acae320801efe Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Wed, 14 Mar 2018 16:40:01 +0800
Subject: [PATCH 103/107] ovs-ctl: fix setting hostname
The command "hostname" is not available in OpenWrt by default.
The other thing to note is that currently kernel.hostname is not a fully
qualitied name
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
---
utilities/ovs-ctl.in | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 43c8f32b7..6203ecff5 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -36,9 +36,7 @@ insert_mod_if_required () {
}
set_hostname () {
- # 'hostname -f' needs network connectivity to work. So we should
- # call this only after ovs-vswitchd is running.
- ovs_vsctl set Open_vSwitch . external-ids:hostname="$(hostname -f)"
+ ovs_vsctl set Open_vSwitch . external-ids:hostname="$(sysctl -n kernel.hostname)"
}
set_system_ids () {