GNU bug report logs - #6235
hostname and -b option

Previous Next

Package: coreutils;

Reported by: "Nelson H. F. Beebe" <beebe <at> math.utah.edu>

Date: Thu, 20 May 2010 22:17:02 UTC

Severity: normal

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 6235 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: "Nelson H. F. Beebe" <beebe <at> math.utah.edu>
Cc: 6235 <at> debbugs.gnu.org, bowman <at> math.utah.edu,
	Brad Hawks <brad <at> physics.utah.edu>
Subject: Re: bug#6235: hostname and -b option
Date: Thu, 20 May 2010 16:31:14 -0600
[Message part 1 (text/plain, inline)]
On 05/20/2010 03:45 PM, Nelson H. F. Beebe wrote:
> We noticed recently that Ubuntu's /bin/hostname has this option
> 
>     -b, --boot            set default hostname if none available
> 
> and uses it in /etc/init/hostname.conf.
> 
> However, the GNU version from coreutils-1.8 lacks that option.

coreutils 1.8 doesn't exist.  Did you mean coreutils 8.5?

> 
> Unfortunately, Ubuntu's startup script puts /usr/local/bin ahead of
> /bin and /usr/bin, thus getting a version of hostname that chokes on
> the -b option.  We patched the configuration file to force an explicit
> path:
> 
>     exec /bin/hostname -b -F /etc/hostname

Correct - Ubuntu's script is buggy if it uses non-standard options
without an explicit path to a version of the utility known to provide
those options.

> 
> Would it be reasonable to consider adding support in coreutils for the -b option?

How would we (portably) implement it?  The problem is that coreutils'
hostname has to compile on many more platforms than just Ubuntu, and
there are just too many distro-specific actions (or even lack of OS
interfaces altogether) for setting a default hostname.

> [I'm not urging that this be done, merely that it be discussed.  In my
> view, Ubuntu is at fault for introducing nonstandard options, and
> messing up the boot PATH, and failing to use explicit paths on
> critical boot-time commands.

Your view is correct.

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

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 13 years and 334 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.