summaryrefslogtreecommitdiffstats
path: root/src/ethernet.subr
diff options
context:
space:
mode:
Diffstat (limited to 'src/ethernet.subr')
-rw-r--r--src/ethernet.subr15
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