lkml.org 
[lkml]   [2006]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add compile domain (was: Re: [PATCH] Well, Linus seems to like Lordi...)
Yeah, hostname --fqdn is so broken:

joshua@numenor:~$ hostname
numenor
joshua@numenor:~$ hostname --fqdn
numenor
joshua@numenor:~$

My normal take is not to use the FQDN as the hostname because it
becomes too long.
If I ever need to know my outside-facing IP address, I connect a UDP
socket to 1.2.3.4
and to a getsockname(). To get outside-hostname, I do a reverse-lookup on that.
Since 1.0.0.0/8 will never be allocated, this is gauranteed to work
when there is a way out.
If there's no way out, I'll find that out too.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-29 22:50    [W:0.099 / U:0.028 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site