public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* hostname command
@ 2010-10-09  6:15 Hans Jørgen Aagaard Jensen
  2010-10-11 14:28 ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Jørgen Aagaard Jensen @ 2010-10-09  6:15 UTC (permalink / raw)
  To: cygwin

Hi

"hostname" in cygwin does not accept the normal unix/linux options as "-f", "-d", etc.
"hostname -f" gives an error message.

We are using "hostname -f" when compiling our quantum chemistry package Dirac, it is used to specify the full domain name in the output of calculations. This is sometimes useful for tracking "where is this dirac.x compiled", if problems should arise which could be related to compiler problems or libraries or ....

I would therefore appreciate if someone would implement at least the "-f" option of the hostname command, so we don't get error messages instead of the hostname as output (and dirac.chem.sdu.dk tells more about where than just dirac).

- Hans Jørgen Aa. Jensen.

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

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: hostname command
  2010-10-09  6:15 hostname command Hans Jørgen Aagaard Jensen
@ 2010-10-11 14:28 ` Eric Blake
  2010-10-11 16:01   ` Charles Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2010-10-11 14:28 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: hostname command
  2010-10-11 14:28 ` Eric Blake
@ 2010-10-11 16:01   ` Charles Wilson
  0 siblings, 0 replies; 3+ messages in thread
From: Charles Wilson @ 2010-10-11 16:01 UTC (permalink / raw)
  To: cygwin

On 10/11/2010 10:27 AM, Eric Blake wrote:
>> 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.

Also, you need to be sure about your PATH settings. I've been bitten
several times when ClearCase's installation directory was "promoted" to
the front of my path, and I accidentally used THEIR hostname executable
-- which does something completely unexpected. (It's a GUI app!)

--
Chuck

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-11 16:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-09  6:15 hostname command Hans Jørgen Aagaard Jensen
2010-10-11 14:28 ` Eric Blake
2010-10-11 16:01   ` Charles Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).