diff options
author | James Rayner <james@archlinux.org> | 2008-12-12 01:55:57 +0100 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2008-12-12 01:55:57 +0100 |
commit | c5019aab33682e9c9e743a761d8616eeb24ce843 (patch) | |
tree | de9f19815920e7211347a86176f62ccbbb854450 /src/ethernet.subr | |
parent | 2d02d12d39d32cc64dcf5ed7b45078b813ce4814 (diff) | |
download | netctl-c5019aab33682e9c9e743a761d8616eeb24ce843.tar.gz netctl-c5019aab33682e9c9e743a761d8616eeb24ce843.tar.xz |
Add ethernet 802.1x support, FS12069, Don't enforce any WEP authentication method, FS11690
Diffstat (limited to 'src/ethernet.subr')
-rw-r--r-- | src/ethernet.subr | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/ethernet.subr b/src/ethernet.subr index 493394b..8823471 100644 --- a/src/ethernet.subr +++ b/src/ethernet.subr @@ -12,8 +12,6 @@ mii_check() { } ethernet_up() { - - if [[ ! -e /sys/class/net/$INTERFACE ]]; then if ! echo "$INTERFACE"|grep ":"; then err_append "Interface $INTERFACE does not exist" @@ -24,7 +22,20 @@ ethernet_up() { err_append "No connection available" return 1 fi + + ifconfig $INTERFACE up + if checkyesno ${8021X:-no}; then + . /usr/lib/network/wireless.subr + [[ -z "$WPA_CONF" ]] && WPA_CONF="/etc/wpa_supplicant.conf" + [[ -z "$WPA_OPTS" ]] && WPA_OPTS="-Dwired" + start_wpa "$INTERFACE" "$WPA_CONF" "$WPA_OPTS" + if ! wpa_check "$INTERFACE"; then + ifconfig $INTERFACE down + return 1 + fi + fi + case $IP in dhcp) # Check if DHCP_TIMEOUT was set if not set a default value |