Author |
Message |
shinobar

Joined: 28 May 2009 Posts: 2664 Location: Japan
|
Posted: Sat 05 Jun 2010, 23:58 Post subject:
Net-setup-20140422 Subject description: net-setup/'Network Wizard' bugfix and improvement |
|
Bugfix and improvement of network-setup scripts by Japanese Forum.
http://shino.pos.to/party/bridge.cgi?puppy/test/net_setup-20140422.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
Last edited by shinobar on Tue 17 Jun 2014, 04:16; edited 1 time in total
|
Back to top
|
|
 |
shinobar

Joined: 28 May 2009 Posts: 2664 Location: Japan
|
Posted: Mon 28 Jun 2010, 03:45 Post subject:
Recent woof problem Subject description: It calls rc.basic instead of rc.network |
|
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: | *)
#this only sets up interface 'lo'...
/etc/rc.d/rc.network_basic &
;; |
rewrite to: (edited on 28 Jun 2010)
Code: | *)
#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: | *)
#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 &
;; |
Last edited by shinobar on Fri 02 Jul 2010, 18:36; edited 3 times in total
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 8526 Location: Perth, Western Australia
|
Posted: Mon 28 Jun 2010, 20:44 Post subject:
|
|
shinobar,
Ok, I have changed rc.sysinit in Woof.
_________________ http://bkhome.org/news/
|
Back to top
|
|
 |
shinobar

Joined: 28 May 2009 Posts: 2664 Location: Japan
|
Posted: Tue 29 Jun 2010, 20:54 Post subject:
rc.sysinit |
|
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: | *) #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: | *) #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
;; |
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 8526 Location: Perth, Western Australia
|
Posted: Thu 01 Jul 2010, 19:59 Post subject:
|
|
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.
_________________ http://bkhome.org/news/
|
Back to top
|
|
 |
shinobar

Joined: 28 May 2009 Posts: 2664 Location: Japan
|
Posted: Tue 17 Jun 2014, 04:20 Post subject:
net_setup-20140422 |
|
UPDATE:
http://shino.pos.to/party/bridge.cgi?puppy/test/net_setup-20140422.pet
1. WPA-AES support
2. more wait before scan
_________________ Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
|
Back to top
|
|
 |
ASRI éducation

Joined: 09 May 2009 Posts: 3203 Location: France
|
Posted: Wed 18 Jun 2014, 07:45 Post subject:
Re: net_setup-20140422 |
|
Thank you.
_________________ Projet ASRI éducation => Association | Forum | Dépôt | Espace kids
|
Back to top
|
|
 |
gcmartin
Joined: 14 Oct 2005 Posts: 6730 Location: Earth
|
Posted: Wed 18 Jun 2014, 16:50 Post subject:
|
|
#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?
_________________ Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engines or use DogPile
|
Back to top
|
|
 |
stemsee
Joined: 27 Jun 2013 Posts: 2138 Location: In The Way
|
Posted: Sun 27 Sep 2015, 04:20 Post subject:
|
|
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
|
Back to top
|
|
 |
stemsee
Joined: 27 Jun 2013 Posts: 2138 Location: In The Way
|
Posted: Mon 28 Sep 2015, 04:29 Post subject:
|
|
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: | #!/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
|
|
Back to top
|
|
 |
|