hostname setting in rc.conf ignored?

Mike Barborak mab2001 at gmail.com
Thu May 17 20:03:24 UTC 2007


Thanks.

For posterity then, anyone who unwisely wishes to give up the hunt and use
this hack, one solution is to add this line to /etc/rc.conf:

local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d
/usr/local/etc/rc.after_everything.d"

Then create the directory /usr/local/etc/rc.after_everything.d (same
permissions as /usr/local/etc/rc.d) and put a file named hostname.sh in that
directory with this content:

#!/bin/sh
/bin/hostname your_hostname_here

Make the file executable.

-Mike


On 5/17/07, Robert Huff <roberthuff at rcn.com> wrote:
>
>
> Mike Barborak writes:
>
> >  Perhaps another tack, what is the last script executed during
> >  boot up? If I add a line like "/bin/hostname www.mydomain.com" to
> >  /etc/rc.local should this force the hostname change?
>
>         Start with "man rc.d".
>
>
>
>                                 Robert Huff
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe at freebsd.org"
>


More information about the freebsd-questions mailing list