Discussion:
RHEL 7, networkmangler - trying to set hostname via dhcp
m***@5-cent.us
2014-07-23 21:03:31 UTC
Permalink
I have yet to find a simple way to do this, that was easy without NM. I've
found scripts... but no simple configuration file, nor RH docs, to tell me
how to have this automatically happen in the "correct" way.

Clues for the poor?

mark
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Harry Hoffman
2014-07-23 23:32:54 UTC
Permalink
Hi Mark,

I think what you’re saying is that you want your system’s name to be set from the DHCP server. Is that correct?

Check if /etc/hostname is present and has some value. If so…
cp /etc/hostname /etc/hostname-`date -I` && rm /etc/hostname

Restart networking/reboot and see if that works for you.

Cheers,
Harry
Post by m***@5-cent.us
I have yet to find a simple way to do this, that was easy without NM. I've
found scripts... but no simple configuration file, nor RH docs, to tell me
how to have this automatically happen in the "correct" way.
Clues for the poor?
mark
--
redhat-list mailing list
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
mark
2014-07-24 01:27:41 UTC
Permalink
Hi, Harry,
Post by Harry Hoffman
Post by m***@5-cent.us
I have yet to find a simple way to do this, that was easy without NM.
I've found scripts... but no simple configuration file, nor RH docs, to
tell me how to have this automatically happen in the "correct" way.
I think what you’re saying is that you want your system’s name to be set
from the DHCP server. Is that correct?
Check if /etc/hostname is present and has some value. If so… cp
/etc/hostname /etc/hostname-`date -I` && rm /etc/hostname
Restart networking/reboot and see if that works for you.
Yes, the dhcp server should hand it its name. And hostname only has, IIRC (I'm
at home now) localhost.localdomain.

mark
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Harry Hoffman
2014-07-24 12:24:06 UTC
Permalink
Right, so follow the set of commands I sent along. That should get you set.

Cheers,
Harry
Post by mark
Hi, Harry,
Post by Harry Hoffman
Post by m***@5-cent.us
I have yet to find a simple way to do this, that was easy without NM.
I've found scripts... but no simple configuration file, nor RH docs, to
tell me how to have this automatically happen in the "correct" way.
I think what you’re saying is that you want your system’s name to be set
from the DHCP server. Is that correct?
Check if /etc/hostname  is present and has some value. If so… cp
/etc/hostname /etc/hostname-`date -I` && rm /etc/hostname
Restart networking/reboot and see if that works for you.
Yes, the dhcp server should hand it its name. And hostname only has, IIRC (I'm
at home now) localhost.localdomain.
mark
--
redhat-list mailing list
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.red
Loading...