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:

There has been ongoing discussion on the Puppy Forum: 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:

Posted on 11 May 2012, 8:08


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