Disconnect from network if hostname changed

Gcmartin started this thread:
http://www.murga-linux.com/puppy/viewtopic.php?t=77743

The script in Woof that is used to change the hostname is /usr/sbin/hostname-set.

I have modified this, so that if the hostname is changed, any network connection is brought down, and information is displayed that it must be reconnected for the new hostname to take effect.

From before, the post-change window also says that X must be restarted for the new hostname to take full effect, but I don't remember why that is required, if at all.

The new script can be viewed here. Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/886f20e9b5


Posted on 5 May 2012, 17:39


Comments:

Posted on 5 May 2012, 18:29 by 01micko
slacko released
Slacko 5.3.3 is released. I made a home page with links to all relevant info. I reckon it looks cool!

Lots of cool stuff in the distro too, not just a pretty face..

It does miss the latest PPM fixes and enhancements but I froze everything at RC.

Enjoy!


Posted on 5 May 2012, 18:39 by BarryK
Network automatic reconnection
I have taken this one logical step further, and automated the network reconnection.

Now what happens, when the hostname is changed, if there was an existing network connection, it is brought down, and the post-change info window informs that a restart of X is required (and when run from QuickSetup this X restart is logged to occur by simple press of a button), and upon X restart the network will also reconnect.

The automatic reconnection is done by a new script, /usr/sbin/network_default_connect, that is called by /usr/bin/xwin (the X startup script).

Woof commits:
http://bkhome.org/fossil/woof2.cgi/info/76ff3102e9
http://bkhome.org/fossil/woof2.cgi/info/8b7d78e651



Posted on 7 May 2012, 12:58 by shinobar
Need not re-connect nor restart X
http://www.murga-linux.com/puppy/viewtopic.php?p=625658#625658


Posted on 8 May 2012, 3:09 by GCMartin
Why drop to X then ...
Hi Barry
This goes all the way back to the problem with ROX when the hostname was changed.

In that past, when a hostname change occurred, there were issues with ROX performance and other subsystem anomolies. The solution that resolved this was when s new system was started to FirstRUN, in efforts to resolve the system's inconsistencies, Playdayz, 01Micko, and Shinobar together worked up the solution that addressed this.

On a logout-login, of the current user the system fields reappeared with consistency thru-out the system. ROX performance returned and all things have been happy....ever since this approach was instigated.

TaZoC, in LH64, did something akin to this as well. Those distros that do NOT use FirstRUN continue to have those past issues. Specifically FATDOG and others.

Sincle screen startup "FirstRUN" has done a great servcie to this community (developers and users alike.

Here to help
Thanks for all you've done.


Posted on 11 May 2012, 8:11 by BarryK
Re hostname
See later blog post:
http://bkhome.org/blog/?viewDetailed=02824