site  contact  subhomenews

HOSTNAME updated if hostname changed

May 11, 2012 — BarryK
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:


Solution appropriate

Tags: woof