FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 10-29-2008, 01:03 PM
"Dominik 'Rathann' Mierzejewski"
 
Default WPA without NetworkManager (was: X on tty1 in Rawhide/F10)

On Wednesday, 29 October 2008 at 02:01, Bill Nottingham wrote:
> Joshua Baker-LePain (jlb17@duke.edu) 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@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 10-29-2008, 07:57 PM
Bill Nottingham
 
Default WPA without NetworkManager (was: X on tty1 in Rawhide/F10)

Dominik 'Rathann' Mierzejewski (dominik@greysector.net) said:
> > 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.

Possibly because that particular patch wasn't ever in bugzilla (AFAICT.)

It's certainly a better one, but there's still the problem of entirely
disparate configuration (manually editing wpa_supplicant.conf, etc.)

Bill

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 10-30-2008, 11:34 AM
"Dominik 'Rathann' Mierzejewski"
 
Default WPA without NetworkManager (was: X on tty1 in Rawhide/F10)

On Wednesday, 29 October 2008 at 21:57, Bill Nottingham wrote:
> Dominik 'Rathann' Mierzejewski (dominik@greysector.net) said:
> > > 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.
>
> Possibly because that particular patch wasn't ever in bugzilla (AFAICT.)

It was, although it contained reindentation cosmetics. I only cleaned it up.

> It's certainly a better one, but there's still the problem of entirely
> disparate configuration (manually editing wpa_supplicant.conf, etc.)

What's wrong with manually editing wpa_supplicant.conf?

The patch doesn't break anything. I don't understand why, in the pursuit
of all-encompassing NM-based network configuration, some people don't want
to allow any alternative methods.

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"

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 10-30-2008, 12:47 PM
Bill Nottingham
 
Default WPA without NetworkManager (was: X on tty1 in Rawhide/F10)

Dominik 'Rathann' Mierzejewski (dominik@greysector.net) said:
> > Possibly because that particular patch wasn't ever in bugzilla (AFAICT.)
>
> It was, although it contained reindentation cosmetics. I only cleaned it up.

Not in either of the open bugs about wpa & initscripts. Perhaps it's
hiding somewhere else. (The ones in the open bugs were 'start WPA
supplicant and magically hope it associates in time'.)

>
> > It's certainly a better one, but there's still the problem of entirely
> > disparate configuration (manually editing wpa_supplicant.conf, etc.)
>
> What's wrong with manually editing wpa_supplicant.conf?

For WEP, you put keys <in one place>. For WPA you put keys and networks <this
entirely separate place and format>. It's a hack.

Bill

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 10-30-2008, 01:04 PM
Dan Williams
 
Default WPA without NetworkManager (was: X on tty1 in Rawhide/F10)

On Thu, 2008-10-30 at 13:34 +0100, Dominik 'Rathann' Mierzejewski wrote:
> On Wednesday, 29 October 2008 at 21:57, Bill Nottingham wrote:
> > Dominik 'Rathann' Mierzejewski (dominik@greysector.net) said:
> > > > 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.
> >
> > Possibly because that particular patch wasn't ever in bugzilla (AFAICT.)
>
> It was, although it contained reindentation cosmetics. I only cleaned it up.
>
> > It's certainly a better one, but there's still the problem of entirely
> > disparate configuration (manually editing wpa_supplicant.conf, etc.)
>
> What's wrong with manually editing wpa_supplicant.conf?

Because it's not easily from anything but wpa_supplicant, and it's
completely different than the existing ifup/ifdown config system.
System-config-network would have to grow the ability to parse the
wpa_supplicant config file format. You can't override the variables
from /etc/sysconfig/network if you want to. There's no separation of
interfaces to allow for multiple connections with two or more wifi cards
with 'ifup number1' and 'ifup number2' independently.

A much better, more integrated and consistent implementation would have
each ifcfg file essentially be a network block in the supplicant config
file. When you 'ifup my-wpa', the scripts write out a new supplicant
config file using key/value pairs
in /etc/sysconfig/network-scripts/ifcfg-my-wpa and execute a supplicant
based on that, then somehow wait for the supplicant to connect by
listening on the specific control socket for a connection, and if no
connection occurs, time out and fail just like DHCP fails. When you
'ifdown my-wpa', it will terminate the supplicant based on the PID file
written to /var/run/wpa_supplicant-wlan0-my-wpa.pid and clean up the
routing and addresses.

That's what the patch _should_ do. Just tossing a config file off to
the supplicant is a cop-out half solution.

> The patch doesn't break anything. I don't understand why, in the pursuit
> of all-encompassing NM-based network configuration, some people don't want
> to allow any alternative methods.

Look in bugzilla. There have been wpa_supplicant bugs filed and many
mailing list posts where I and others have said "If somebody shows up to
add WPA support to initscripts in the right way that's great!" We're
just not going to spend effort on it.

Dan


--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 10-30-2008, 07:12 PM
"Dominik 'Rathann' Mierzejewski"
 
Default WPA without NetworkManager (was: X on tty1 in Rawhide/F10)

On Thursday, 30 October 2008 at 14:47, Bill Nottingham wrote:
> Dominik 'Rathann' Mierzejewski (dominik@greysector.net) said:
> > > Possibly because that particular patch wasn't ever in bugzilla (AFAICT.)
> >
> > It was, although it contained reindentation cosmetics. I only cleaned it up.
>
> Not in either of the open bugs about wpa & initscripts. Perhaps it's
> hiding somewhere else. (The ones in the open bugs were 'start WPA
> supplicant and magically hope it associates in time'.)

I'll try to find it.

> > > It's certainly a better one, but there's still the problem of entirely
> > > disparate configuration (manually editing wpa_supplicant.conf, etc.)
> >
> > What's wrong with manually editing wpa_supplicant.conf?
>
> For WEP, you put keys <in one place>. For WPA you put keys and networks <this
> entirely separate place and format>. It's a hack.

You can use wpa_supplicant for WEP, too.

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"

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 10-30-2008, 07:18 PM
"Dominik 'Rathann' Mierzejewski"
 
Default WPA without NetworkManager (was: X on tty1 in Rawhide/F10)

On Thursday, 30 October 2008 at 15:04, Dan Williams wrote:
> On Thu, 2008-10-30 at 13:34 +0100, Dominik 'Rathann' Mierzejewski wrote:
[...]
> > What's wrong with manually editing wpa_supplicant.conf?
>
> Because it's not easily from anything but wpa_supplicant, and it's
> completely different than the existing ifup/ifdown config system.
> System-config-network would have to grow the ability to parse the
> wpa_supplicant config file format. You can't override the variables
> from /etc/sysconfig/network if you want to. There's no separation of
> interfaces to allow for multiple connections with two or more wifi cards
> with 'ifup number1' and 'ifup number2' independently.

How often do you see machines with multiple wifi cards? I haven't seen
any. I could easily set one up by adding a usb stick with wifi or a pcmcia
card, but I haven't needed it yet.

> A much better, more integrated and consistent implementation would have
> each ifcfg file essentially be a network block in the supplicant config
> file. When you 'ifup my-wpa', the scripts write out a new supplicant
> config file using key/value pairs
> in /etc/sysconfig/network-scripts/ifcfg-my-wpa and execute a supplicant
> based on that, then somehow wait for the supplicant to connect by
> listening on the specific control socket for a connection, and if no
> connection occurs, time out and fail just like DHCP fails. When you
> 'ifdown my-wpa', it will terminate the supplicant based on the PID file
> written to /var/run/wpa_supplicant-wlan0-my-wpa.pid and clean up the
> routing and addresses.
>
> That's what the patch _should_ do. Just tossing a config file off to
> the supplicant is a cop-out half solution.

Alright, I'll see what I can come up with. I guess I can understand your
unwillingness to accept a half-assed solution that works only in one scenario.
After all, I don't like half-assed solutions myself.

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"

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 10-31-2008, 02:23 AM
Ralf Corsepius
 
Default WPA without NetworkManager (was: X on tty1 in Rawhide/F10)

On Thu, 2008-10-30 at 21:18 +0100, Dominik 'Rathann' Mierzejewski wrote:
> On Thursday, 30 October 2008 at 15:04, Dan Williams wrote:
> > On Thu, 2008-10-30 at 13:34 +0100, Dominik 'Rathann' Mierzejewski wrote:
> [...]
> > > What's wrong with manually editing wpa_supplicant.conf?
> >
> > Because it's not easily from anything but wpa_supplicant, and it's
> > completely different than the existing ifup/ifdown config system.
> > System-config-network would have to grow the ability to parse the
> > wpa_supplicant config file format. You can't override the variables
> > from /etc/sysconfig/network if you want to. There's no separation of
> > interfaces to allow for multiple connections with two or more wifi cards
> > with 'ifup number1' and 'ifup number2' independently.
>
> How often do you see machines with multiple wifi cards? I haven't seen
> any.
Until last week, I haven't see one, either, but I could not manage to
get the RealTek wifi working on my netbook, ...

> I could easily set one up by adding a usb stick with wifi or a pcmcia
> card, but I haven't needed it yet.
..., which had caused me to try exactly what you describe.

Provided how cheap these usb-beasts have become, it doesn't need much
imagination to envision you'll soon see more of such systems.

Ralf




--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 10-31-2008, 03:05 PM
Dan Williams
 
Default WPA without NetworkManager (was: X on tty1 in Rawhide/F10)

On Thu, 2008-10-30 at 21:18 +0100, Dominik 'Rathann' Mierzejewski wrote:
> On Thursday, 30 October 2008 at 15:04, Dan Williams wrote:
> > On Thu, 2008-10-30 at 13:34 +0100, Dominik 'Rathann' Mierzejewski wrote:
> [...]
> > > What's wrong with manually editing wpa_supplicant.conf?
> >
> > Because it's not easily from anything but wpa_supplicant, and it's
> > completely different than the existing ifup/ifdown config system.
> > System-config-network would have to grow the ability to parse the
> > wpa_supplicant config file format. You can't override the variables
> > from /etc/sysconfig/network if you want to. There's no separation of
> > interfaces to allow for multiple connections with two or more wifi cards
> > with 'ifup number1' and 'ifup number2' independently.
>
> How often do you see machines with multiple wifi cards? I haven't seen
> any. I could easily set one up by adding a usb stick with wifi or a pcmcia
> card, but I haven't needed it yet.

Internal + USB? If you want to do wireless -> wireless sharing (say, in
a hotel with $$$ wifi) then this is really your only option at the
moment.

Dan

> > A much better, more integrated and consistent implementation would have
> > each ifcfg file essentially be a network block in the supplicant config
> > file. When you 'ifup my-wpa', the scripts write out a new supplicant
> > config file using key/value pairs
> > in /etc/sysconfig/network-scripts/ifcfg-my-wpa and execute a supplicant
> > based on that, then somehow wait for the supplicant to connect by
> > listening on the specific control socket for a connection, and if no
> > connection occurs, time out and fail just like DHCP fails. When you
> > 'ifdown my-wpa', it will terminate the supplicant based on the PID file
> > written to /var/run/wpa_supplicant-wlan0-my-wpa.pid and clean up the
> > routing and addresses.
> >
> > That's what the patch _should_ do. Just tossing a config file off to
> > the supplicant is a cop-out half solution.
>
> Alright, I'll see what I can come up with. I guess I can understand your
> unwillingness to accept a half-assed solution that works only in one scenario.
> After all, I don't like half-assed solutions myself.
>
> 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"
>

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 12:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org