From 05a6fa94778f9d6c54ca676de80708d03d6c365a Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Wed, 14 Mar 2018 16:40:01 +0800 Subject: [PATCH 103/104] 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 --- utilities/ovs-ctl.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/utilities/ovs-ctl.in +++ b/utilities/ovs-ctl.in @@ -64,9 +64,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 () {