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

Re: Persisting a one-off hostname change



Jason Heeris wrote:
> I have an image of a Debian Squeeze system that I want to put onto
> multiple systems (flash-based disks for a single-board computer). I'd
> like each system to have a different hostname, but have that hostname
> persist across subsequent reboots.

If you are generating random hostnames then does it actually matter
what name the current host uses?  Would "localhost" be as good as any
randomly generated one?

> Is there another point in the rcS.d script sequence where I can
> persist the current hostname? After S10mountall.sh? Or is there a
> better way to achieve this that I'm missing?

You could still set the hostname randomly.  Then later come back and
write the current hostname to the /etc/hostname file when it is
writable.

But I think you might be just as well off using "localhost" as making
up a random name.  (shrug)

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: