Two small problems in network.sh

[ Thread Index | Date Index | More lists.tuxfamily.org/slitaz Archives ]


Hi all,

I just noticed two small problems with network.sh (slitaz-boot-scripts
3.2, http://mirror.slitaz.org/packages/cooking/slitaz-boot-scripts-3.2.tazpkg).
1- A problem with wifi authentification throught WPA2-PSK
2- A problem with a static IP configuration.

Here is the way I solved these:

1- Wifi authentification with WPA2-PSK :
The temporary configuration file for wpa_supplicant created by
/etc/init.d/network.sh define (on line 92) the parameter:
    proto=WPA
which limits to an authentification through WPA-PSK. If the parameter
is not set, it defaults proto=WPA, RSN which allows WPA and WAP2
authentification (see /etc/wpa_supplicant.conf ligne 209).
So I removed the line 92.

2- When configuring the network with a static IP, the wifi card and
the access point are not associated since wpa_supplicant is waiting
for wpa_cli (lines 99 and 117): -W parameter.
A dirty trick could be to start wpa_cli, in the static_ip() function:
    wpa_cli -B

I join a diff with the modifications.

Cheers,

Arnaud.
--- /etc/init.d/network.sh	Sun Jan 10 22:58:59 2010
+++ network.sh	Thu Jan 28 01:26:35 2010
@@ -89,7 +89,6 @@
 network={
 	ssid="$WIFI_ESSID"
 	scan_ssid=1
-	proto=WPA
 	key_mgmt=WPA-PSK
 	psk="$WIFI_KEY"
 	priority=5
@@ -151,6 +150,7 @@
 		echo "Configuring static IP on $INTERFACE: $IP..."
 		/sbin/ifconfig $INTERFACE $IP netmask $NETMASK up
 		/sbin/route add default gateway $GATEWAY
+		wpa_cli -B
 		# Multi-DNS server in $DNS_SERVER.
 		/bin/mv /etc/resolv.conf /tmp/resolv.conf.$$
 		for NS in $DNS_SERVER


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/