hostname command

Eric Blake eblake@redhat.com
Mon Oct 11 14:28:00 GMT 2010


On 10/09/2010 12:15 AM, Hans Jørgen Aagaard Jensen wrote:
> Hi
>
> "hostname" in cygwin does not accept the normal unix/linux options as "-f", "-d", etc.

That's correct - cygwin's hostname(1) comes from coreutils, which does 
not support all the options that some other hostname(1) implementations 
provide.

> We are using "hostname -f" when compiling our quantum chemistry package Dirac,

Which is inherently non-portable - you'll have to update your package to 
be prepared for the fact that -f might not work on all systems.

> I would therefore appreciate if someone would implement at least the "-f" option of the hostname command,

If you want it in coreutils, then propose it upstream to the 
bug-coreutils AT gnu DOT org list.  Otherwise, if you are proposing that 
the cygwin distro use a different hostname(1) implementation than what 
is provided by coreutils, then please propose a new package for that 
implementation, and coordinate on cygwin-apps about transitioning 
hostname from coreutils over to the new package.

> PS. the builtin hostname in bash just ignore options. I am referring to /bin/hostname.exe.

Bash does not have a builtin hostname.  When you type hostname in bash, 
you ARE using /bin/hostname, which is currently from coreutils.

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list