WPA without NetworkManager (was: Re: X on tty1 in Rawhide/F10)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, 29 October 2008 at 02:01, Bill Nottingham wrote:
> Joshua Baker-LePain (jlb17@xxxxxxxx) said: 
> >> > NetworkManager is not an option and has no place on my machines.
> >>
> >> Right-click -> "Edit connections", pick your preferred setting, click 
> >> on 'System setting'.
> >
> > Right-click on what?  I run fvwm.  How are non-DE users supposed to  
> > interact with NM?
> 
> He was asking how to make NM work after logging out, which does sort
> of presume he's already using it. If you are seriously asking about how
> to configure NM when you aren't actually using it, well...
> 
> >> (Note: Not valid for WPA, etc. That doesn't work outside of NM anyway...)
> >
> > Yes, yes it does.  And it should.
> 
> Not in the context of init.d/network, which is what I meant. (Well, not
> outside of gross hacks.)

Yes, it works in that context. /etc/sysconfig/network-scripts/ifup-wireless
needs a small patch which I posted in bugzilla and which has been ignored
for years. The patch isn't actually mine, it was posted on one of fedora lists.
I can't find that bugzilla report right now so I'm attaching the patch here
instead.

Regards,
R.

-- 
Fedora http://fedoraproject.org/wiki/User:Rathann
RPMFusion http://rpmfusion.org | MPlayer http://mplayerhq.hu
"Faith manages."
        -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
--- ifup-wireless.orig	2005-09-30 20:51:15.000000000 +0200
+++ ifup-wireless	2006-04-07 16:09:01.000000000 +0200
@@ -30,6 +30,35 @@
 
 # Only meant to be called from ifup.
 
+if wpa_cli -i $DEVICE status >/dev/null 2>&1; then
+    eval $(wpa_cli -i${DEVICE} status | grep wpa_state 2>/dev/null) 
+    if [ "$wpa_state" != "COMPLETED" ]; then
+	/sbin/ip link set $DEVICE down
+	/sbin/ip link set $DEVICE up
+	wpa_cli scan >/dev/null 2>&1
+    fi
+    old_state=""
+    cnt=0
+    while true; do
+	eval $(wpa_cli -i${DEVICE} status | grep 'wpa_state|ssid' 2>/dev/null) 
+	if [ "$wpa_state" = "COMPLETED" ]; then
+	    echo $"Connected to $ssid"
+	    break
+	fi
+	if [ "$old_state" != "$wpa_state" ]; then
+	    echo -n "$wpa_state "
+	    old_state=$wpa_state
+	fi
+
+	sleep 1
+	cnt=$[$cnt + 1]
+	if [ $cnt -gt 90 ]; then
+	    echo -n $"Timeout "
+	    exit 10
+	fi
+    done 
+else
+
 # Mode need to be first : some settings apply only in a specific mode !
 if [ -n "$MODE" ] ; then
     iwconfig $DEVICE mode $MODE
@@ -97,3 +126,5 @@
     # use any essid
     iwconfig $DEVICE essid any >/dev/null 2>&1
 fi
+
+fi
-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux