HOSTNAME updated if hostname changed

An issue with the network when hostname is changed, was discussed recently on this blog, and I applied a fix in Woof:
http://bkhome.org/blog/?viewDetailed=02813

There has been ongoing discussion on the Puppy Forum:
http://www.murga-linux.com/puppy/viewtopic.php?t=77743

...in which it was mentioned one problem is that the global variable HOSTNAME does not get updated until a reboot. Some applications read this variable.

HOSTNAME is exported in /etc/profile at bootup. However, as QuickSetup recommends to restart X after hostname is changed, there is the opportunity to export the updated HOSTNAME variable.
This is already done in the case of the LANG variable, which is exactly the same situation, exported in /etc/profile, and may be changed by QuickSetup.

The code that exports the updated LANG and HOSTNAME variables is /usr/bin/xwin. Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/c440074e1c


Posted on 11 May 2012, 8:08


Comments:

Posted on 13 May 2012, 2:32 by GCMartin
Solution appropriate
Puppy matures internally and externally, thanks to this solution.