Page 1 of 1
Net-setup-20140422
Posted: Sun 06 Jun 2010, 03:58
by shinobar
Bugfix and improvement of network-setup scripts by Japanese Forum.
http://shino.pos.to/party/bridge.cgi?pu ... 140422.pet
(OLD)
net-setup-20100310.pet
from here.
- improved WEP wireless connection with wait which seems required for some hardwares.
- proper error messages when connection failed
- use one available connection even if multiple interfaces exist
- automatical setting in case eth0 and DHCP available
- allow manual disconnection and/or re-connection even when Wake-on-lan active.
Original topic:
http://www.murga-linux.com/puppy/viewtopic.php?t=53354
Recent woof problem
Posted: Mon 28 Jun 2010, 07:45
by shinobar
The rc.sysinit of recent woof, maybe 100216 and later, has a problem in automatic setting with this net-setup.
It calls rc.basic instead of rc.network for the first run.
The /etc/rc.d/rc.sysinit should be modified:
/etc/rc.d/rc.sysinit at line 532- or so
Code: Select all
*)
#this only sets up interface 'lo'...
/etc/rc.d/rc.network_basic &
;;
rewrite to: (edited on 28 Jun 2010)
Code: Select all
*)
#100628 shinobar: launch rc.network if eth0 is usable
#this only sets up interface 'lo'...
RCNETWORK=/etc/rc.d/rc.network_basic
# eth0 usable?
/sbin/ifconfig eth0 &>/dev/null && [ -x /etc/rc.d/rc.network ] && RCNETWORK=/etc/rc.d/rc.network
$RCNETWORK &
;;
Or, adding code for Pwireless2 (edited on 3 Jul 2010)
Code: Select all
*)
#3jul10 shinobar: launch rc.network/Pwireless2 if eth0 is usable
#this only sets up interface 'lo'...
RCNETWORK=/etc/rc.d/rc.network_basic
# eth0 usable?
if /sbin/ifconfig eth0 &>/dev/null ;then
if [ -x /etc/rc.d/rc.network ]; then
RCNETWORK=/etc/rc.d/rc.network
elif [ -e /etc/init.d/Pwireless2 ]; then
chmod 755 /etc/init.d/Pwireless2
fi
fi
$RCNETWORK &
;;
Posted: Tue 29 Jun 2010, 00:44
by BarryK
shinobar,
Ok, I have changed rc.sysinit in Woof.
rc.sysinit
Posted: Wed 30 Jun 2010, 00:54
by shinobar
BarryK wrote: I have changed rc.sysinit in Woof.
Thanks Barry.
Concider another improvement of rc.sysinit.
http://www.murga-linux.com/puppy/viewtopic.php?t=57252
EDIT:
as for calling rc.network or Pwireless2,
/etc/rc.d/rc.sysinit at line 493- or so
Code: Select all
*) #try determine which tool was used to setup networking...
if [ -s /etc/simple_network_setup/connections ];then #100306
NETCHOICE='sns'
else
CHECKOLDWIZ="`ls -1 /etc/*[0-9]mode 2>/dev/null`" #ex: eth0mode, wlan0mode.
if [ "$CHECKOLDWIZ" != "" -a -d /usr/local/net_setup ];then
NETCHOICE='net_wiz_classic'
else
CHECKNEWWIZ="`ls -1 /etc/network-wizard/network/interfaces 2>/dev/null`"
if [ "$CHECKNEWWIZ" != "" ];then
NETCHOICE='net-setup.sh'
else
[ -f /usr/local/Pwireless2/interface ] && NETCHOICE='Pwireless2' #100304
fi
fi
fi
;;
rewrite:
Code: Select all
*) #try determine which tool was used to setup networking...
if [ -s /etc/simple_network_setup/connections ];then #100306
NETCHOICE='sns'
else
CHECKOLDWIZ="`ls -1 /etc/*[0-9]mode 2>/dev/null`" #ex: eth0mode, wlan0mode.
if [ "$CHECKOLDWIZ" != "" -a -d /usr/local/net_setup ];then
NETCHOICE='net_wiz_classic'
else
CHECKNEWWIZ="`ls -1 /etc/network-wizard/network/interfaces 2>/dev/null`"
if [ "$CHECKNEWWIZ" != "" ];then
NETCHOICE='net-setup.sh'
elif [ -f /usr/local/Pwireless2/interface ]; then
NETCHOICE='Pwireless2' #100304
elif [ -x /etc/rc.d/rc.network ]; then # 30jun10 shinobar
NETCHOICE='net-setup.sh'
elif [ -x /etc/init.d/Pwireless2 ]; then # 30jun10 shinobar
NETCHOICE='Pwireless2'
fi
fi
fi
;;
Posted: Thu 01 Jul 2010, 23:59
by BarryK
So on the very first boot, it will default to running net-setup.sh.
I don't want that. SNS is my preferred choice.
The network_tray ion in the tray displays with a big red cross in it at first boot, and mouse-over pops up a message to click the 'connect' icon to make a connection to the Internet. Given that there are many different ways to connect to the Internet, I prefer this manual approach for now.
net_setup-20140422
Posted: Tue 17 Jun 2014, 08:20
by shinobar
Re: net_setup-20140422
Posted: Wed 18 Jun 2014, 11:45
by ASRI éducation
Posted: Wed 18 Jun 2014, 20:50
by gcmartin
#1
Is this going to WOOF-CE?
#2
Also, if the motherboard has 2 LAN adapters where only 1 (for example eth1) has the active cable to the switch, will this autodetect it?
Posted: Sun 27 Sep 2015, 08:20
by stemsee
Could dual phase security, as on android devices, be added as an option.
Phase 1 EAP method
PEAP
phase 2
MSCHAPV2
ID
email etc
wpa/2
password
Posted: Mon 28 Sep 2015, 08:29
by stemsee
Did it myself. Depends on yad. Save in path and make executable.
You simply enter space separated values for ssid (name of wifi network you wish to join) use inverted commas " "; identity (username/email etc) use inverted commas " "; and password (visible) use inverted commas " " too. Works fine as long as phase 1 is PEAP and phase 2 is MSCHAPv2
Code: Select all
#!/bin/sh
# Script by stemsee, connects a linux system to dual phase security wifi
# network, and retains details across reboots of last used network.
# Developed on puppy linux which is always root.
if [ "$1" = reset ]; then
rm -f $HOME/.eduwifi
fi
rm -f /tmp/wpa_supplicant.conf
rm -r /var/run/wpa_supplicant/wlan0
killall dhcpcd
sleep 1
if [ -f $HOME/.eduwifi ]; then
input=`cat $HOME/.eduwifi`
else
input=$(yad --width=600 --title "Enter the; network name (space) your id (space) password (space) interface" --entry)
if [ ! -z "$input" ]; then
echo "$input" > $HOME/.eduwifi
else
exit 0
fi
fi
ssid=`echo "$input" | cut -f1 -d ' '`
identity=`echo "$input" | cut -f2 -d ' '`
password=`echo "$input" | cut -f3 -d ' '`
interf=`echo "$input" | cut -f4 -d ' '`
echo "ctrl_interface=/var/run/wpa_supplicant
update_config=1
fast_reauth=1
ap_scan=1
network={
ssid='$ssid'
proto=RSN
key_mgmt=WPA-EAP
pairwise=CCMP
eap=PEAP
phase2='auth=MSCHAPV2'
identity='$identity'
password='$password'
}
" > /etc/network-wizard/wireless/wpa_profiles/eduroam.conf
cat /etc/network-wizard/wireless/wpa_profiles/eduroam.conf | tr "'" '"' > /etc/network-wizard/wireless/wpa_profiles/eduroam.conf1
mv /etc/network-wizard/wireless/wpa_profiles/eduroam.conf1 /etc/network-wizard/wireless/wpa_profiles/eduroam.conf
wpa_supplicant -Dwext -i "$interf" -c /etc/network-wizard/wireless/wpa_profiles/eduroam.conf -B
sleep 1
dhcpcd -L &
exit 0