bug-coreutils
[Top][All Lists]
Advanced

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

bug#6235: hostname and -b option


From: Eric Blake
Subject: bug#6235: hostname and -b option
Date: Thu, 20 May 2010 16:31:14 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b1 Mnenhy/0.8.2 Thunderbird/3.0.4

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   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]