Network scripts

Hello!

I’m using my computer on a TTLS network, so I need wpa_supplicant to make it work.
Ubuntu 8.10 has a nice graphical configuration, on opensuse I’m trying to manually set-up the same thing.

The problem is that wpa_supplicant must be run before dhcp kicks in, so script in /etc/sysconfig/network/if-up.d/ will run this too late (I get an internal IP with no external access), editing:
/etc/ifplugd/ifplugd.action
doesn’t work either, because probably plugd is called with custom parameters and ignoring default config file.

The best working solution till now is to edit:
/etc/sysconfig/network/scripts/ifplugd-selectif

and inject this piece of code into up event:

if  $INTERFACE == "eth0" ]; then
  echo "eth0 detected, using wpa_supplicant"
  /usr/sbin/wpa_supplicant -Dwired -ieth0 -c /etc/wpa_supplicant.conf -d > /dev/null &
fi

Modifying the script itself is not really a good solution, since they get replaced on update, so it is possible to do this in a better way (via some config)?

The goal is to run wpa_supplicant before eth0 is brought up, so it have enough time to authenticate.

I took a quick look and there is mention of running wpa-supplicant on demand if some variables are set, from ifup-wireless which I think will be called from ifplugd-select. Maybe you could see what that is all about.

/etc/sysconfig/network/scripts/ifup-wireless

This script seems to have effect only on wireless interfaces, doesn’t work here.
Probably the only solution is editing mentioned script.

I asked on opensuse networking mailing list, will post if there is a better.

Hmm, isn’t wpa-supplicant used for wireless interfaces? Oh I see you are using it on a wired interface. In that case I doubt if there is anything standard for you, yours seems to be a special situation and you have deal with it as best as you can.

No, also for wired e.g.:
wpa_supplicant -Dwired -ieth0 -c /etc/wpa_supplicant.conf -d > /dev/null &

This is used for eduroam networks.

Maybe it could be an enhancement request for the next release to extend that configuration to wired interfaces also.