Re: hostname setting in rc.conf ignored?

2007-05-17 Thread Mike Barborak

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 <[EMAIL PROTECTED]> 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@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "
[EMAIL PROTECTED]"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: hostname setting in rc.conf ignored?

2007-05-17 Thread Robert Huff

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@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: hostname setting in rc.conf ignored?

2007-05-17 Thread Mike Barborak

Thanks for the suggestions.

That's right, I'm not using DHCP.

I searched through /etc and /usr/local/etc for calls to hostname and for the
string www.mydomain.com and all I found was a call to the command "hostname"
in /etc/rc.network and my setting of the hostname variable in /etc/rc.conf.
After perusing /etc, apparently rc.network is called by /etc/rc after
sourcing rc.conf and this is how the hostname in /etc/rc.conf becomes the
hostname of the machine. So that appears to be fine.

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?

Thanks,
Mike



On 5/17/07, Mark Tinguely <[EMAIL PROTECTED]> wrote:



I understand DHCP setting the hostname, which you are not using.
I understand DNS or /etc/hosts reporting the old name on the network,
but it should not effect hostname.

I would look for the old name:

# grep -r mydomain.com /etc

--Mark Tinguely


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: hostname setting in rc.conf ignored?

2007-05-17 Thread Mike Barborak

No, there's not. This is the entire rc.conf file:

hostname="www.mydomain.com"
sshd_enable="NO"
vsapd_enable="YES"
enable_quotas="YES"
clamav_clamd_enable="YES"
spamd_enable="YES"
spamd_pidfile="/var/run/spamd.pid"
spamd_flags="-c -d -r ${spamd_pidfile} --socketpath=/var/run/spamd.sock"
mysql_enable="YES"
mysql_args="--old-passwords --skip-character-set-client-handshake"

Anything else I might check?

Thanks,
Mike


On 5/17/07, John Nielsen <[EMAIL PROTECTED]> wrote:


On Thursday 17 May 2007 01:27:52 pm Mike Barborak wrote:
> Hello,
>
> I have a FreeBSD 4.7-RELEASE-p28 server that was initially configured
with
> the hostname mydomain.com. I am trying to permanently change that to be
> www.mydomain.com. I have added this line to my /etc/rc.conf file:
>
> hostname="www.mydomain.com"
>
> but after restarting the server it continues to return mydomain.com when
i
> run the command hostname. Can anyone tell me what I am doing wrong?

Is there a second hostname entry further down in rc.conf with the original
value?

JN


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: hostname setting in rc.conf ignored?

2007-05-17 Thread John Nielsen
On Thursday 17 May 2007 01:27:52 pm Mike Barborak wrote:
> Hello,
>
> I have a FreeBSD 4.7-RELEASE-p28 server that was initially configured with
> the hostname mydomain.com. I am trying to permanently change that to be
> www.mydomain.com. I have added this line to my /etc/rc.conf file:
>
> hostname="www.mydomain.com"
>
> but after restarting the server it continues to return mydomain.com when i
> run the command hostname. Can anyone tell me what I am doing wrong?

Is there a second hostname entry further down in rc.conf with the original 
value?

JN
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


hostname setting in rc.conf ignored?

2007-05-17 Thread Mike Barborak

Hello,

I have a FreeBSD 4.7-RELEASE-p28 server that was initially configured with
the hostname mydomain.com. I am trying to permanently change that to be
www.mydomain.com. I have added this line to my /etc/rc.conf file:

hostname="www.mydomain.com"

but after restarting the server it continues to return mydomain.com when i
run the command hostname. Can anyone tell me what I am doing wrong?

Thanks,
Mike
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"