(SP1) Old Network Wizard can coexist with new Wizard
October 17, 2008 —
BarryK
Dougals new Network Wizard is by far superior than the one in Puppy 4.00 and earlier. This is where all our effort is going, and this is what everyone should use.
However, in case someone, for whatever reason, had network setup working in 4.00 but not in 4.1, I thought, why not throw in the old Wizard also? Make it a bit less accessable though, so noone chooses it as the first choice. So, I repackaged it, to live at /usr/local/net_setup, including /usrl/local/net_setup/etc/rc.d/rc.network. The 'connect' icon on the desktop does not offer this old Wizaqrd, however I have put it in the Network menu as "Network Wizard (old version)".
I don't know if it is a good idea to even offer this fall-back, but, well, it probably doesn't do any harm. If for any reason someone feels that they need to use it, they should report that, and the reason determined. One thought though, is that the mechanism as explained below could be used to support any alternative Network Wizard if someone ever feels compelled to work on such a thing.
I have put this into /etc/rc.d/rc.update (called from rc.sysinit):
if [ $OLDPVERSION -lt 411 ];then #v411
#remove the config files for the old Network Wizard...
rm -f /etc/*[0-9]mode
fi
Then I have put this into /etc/rc.d/rc.sysinit:
#v411 can use old network wizard (from 403, based on 400)...
CHECKOLDWIZ="`ls -1 /etc/*[0-9]mode 2>/dev/null`" #ex: eth0mode, wlan0mode.
if [ "$CHECKOLDWIZ" != "" -a -d /usr/local/net_setup ];then
#note, old wizard is located in /usr/local/net_setup.
/usr/local/net_setup/etc/rc.d/rc.network &
else
/etc/rc.d/rc.network &
fi
So, if someone uses the old Wizard, then /etc/*[0-9]mode will exist (for example, eth0mode or wlan0mode) and the old rc.network will be executed.
On the otherhand, someone might try the old Wizard then go back to the new Wizard. So, I added a line in Dougal's Network Wizard, net-setup.sh, line 1871:
#v411 BK hack to remove old network wizard configs so rc.sysinit won't use them if old wizard installed...
[ "`ls -1 /etc/network-wizard/network/interfaces 2>/dev/null`" != "" ] && rm -f /etc/*[0-9]mode
...Dougal, would you mind putting that into your copy of the script? It's a good line to have even if the old Wizard is not installed, as it removes any confusion about what those files are now doing.
I have upgraded to Dougal's latest Network Wizard, dated October 11.
The old Network Wizard is now packaged as 'net_setup_retro-411'.
Tags: puppy