Re: [openssh-commits] [openssh] 02/02: upstream: hostname is not specified by POSIX but uname -n is, so use

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

 



On Sun, Feb 07, 2021 at 03:43:24PM -0700, Bob Proulx wrote:
> Tim Rice wrote:
> > > -HOST=`hostname | cut -f1 -d.`
> > > -HOSTNAME=`hostname`
> > > +HOST=`uname -n | cut -f1 -d.`
> > > +HOSTNAME=`uname -n`
> > 
> > This may not work as intended.
> > ....
> > tim@server01-UnixWare 69% hostname
> > server01.int.multitalents.net
> > tim@server01-UnixWare 70% uname -n
> > server01
> > ....
> 
> I'll just note that on Debian, Ubuntu, other derivatives (such as
> Mint, Trisquel...) both the "uname -n" and "hostname" values would
> typically be just the short name.  It's not just UnixWare...
> 
>     rwp@havoc:~$ uname -n
>     havoc
> 
>     rwp@havoc:~$ hostname
>     havoc
> 
Isn't it just 'hostname -f'?

    chris$ hostname -f
    t470.zbmc.eu
    chris$ hostname
    t470


-- 
Chris Green
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



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

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux