On Fri, 30 Nov 2018 at 23:23, Aaron Conole <[email protected]> wrote:
>
> Yousong Zhou <[email protected]> writes:
>
> > From: Yousong Zhou <[email protected]>
> >
> > The command "hostname" is not available in OpenWrt by default. Strace
> > result of hostname-3.13 on centos7 shows that bare "hostname" command
> > calls uname() to fetch node name.
> >
> > Signed-off-by: Yousong Zhou <[email protected]>
> > ---
> > utilities/ovs-ctl.in | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
> > index e42f0f1e6..7f2b17b06 100644
> > --- a/utilities/ovs-ctl.in
> > +++ b/utilities/ovs-ctl.in
> > @@ -40,7 +40,7 @@ set_hostname () {
> > # call this only after ovs-vswitchd is running.
> > hn="$(hostname -f)"
> > if test X$FULL_HOSTNAME = Xno; then
> > - hn="$(hostname)"
> > + hn="$(uname -n)"
> > fi
>
> Should we also modify the call to 'hostname' above, too? ie:
>
> - hn="$(hostname -f)"
> + hn="$(uname -n)"
>
> I don't know since uname -n is always the same as hostname -f,
> iirc. That makes the option (FULL_HOSTNAME=no) look strange.
>
> Actually, that makes me think that the hn="$(hostname)" might need to
> have been 'hostname -s' - but I'm not sure.
On my centos7 machine, `hostname -f` will try to form and verify fqdn
by reading "domain" from /etc/resolv.conf and doing dns query. I
think the output of "uname -n" is same as with "sysctl -n
kernel.hostname"
yousong
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev