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

Re: Persisting a one-off hostname change



On Mon, Feb 27, 2012 at 7:07 PM, Jason Heeris <jason.heeris@gmail.com> wrote:
> On 28 February 2012 00:27, Tom H <tomh0665@gmail.com> wrote:


>> Thanks for the explanation. It's a good plan but I think that you
>> name'll be invoked in some non-flattering contexts once this is
>> implemented... :)
>
> How would you approach it?

Everywhere that I've worked the hostnames have had something to
indicate its purpose and its location. If I'd worked somewhere with
your scheme, I'd have thought that whoever set it up was a sadist but
would've got used to it within a week or two.


>> "cp /etc/rc.local /etc/rc.local.final" and "vi /etc/rc.local" to add
>> your "/dev/random" hostname stuff followed by "mv /etc/rc.local.final
>> /etc/rc.local".
>
> Thanks for the rc.local tip, but... won't the last command just
> overwrite the rc.local script I just edited?

The "mv /etc/rc.local.final /etc/rc.local" would be the last line in
the first-boot's "/etc/rc.local" so that your "/dev/random" hostname
stuff only runs once. I've just tried it and it was OK.


Reply to: