[OE-core] [PATCH V2] base-files: provide a mechanism to skip creation of the hostname file
Mark Asselstine
mark.asselstine at windriver.com
Tue Aug 28 18:53:40 UTC 2012
On August 28, 2012 19:38:04 Phil Blundell wrote:
> On Tue, 2012-08-28 at 14:20 -0400, Mark Asselstine wrote:
> > + if [ "${hostname}" != "none" ]; then
>
> This magic string value seems a bit unwholesome. Can't you just check
> against the empty string?
The 'none' was suggested by a colleague and I just ran with it, but yes an
empty string would work just fine and be less 'unwholesome' as you say.
>
> Also, if the problem is that the static hostname set here is overriding
> the one from dhcp or the command line, I wonder whether this just
> indicates that the priority of them is wrong and the scripting should be
> adjusted so that the static file has lower priority than the other two
> things.
hostname.sh doesn't leave much room for priority
---snip---
if test -f /etc/hostname
then
hostname -F /etc/hostname
fi
---snip---
looking at this you can see my logic, don't create the /etc/hostname file get
rid of the overwrite.
Mark
>
> p.
More information about the Openembedded-core
mailing list