summaryrefslogtreecommitdiffstats
path: root/src/connections/ethernet
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2009-09-07 14:29:56 +0200
committerJames Rayner <james@archlinux.org>2009-09-07 14:29:56 +0200
commit820d9295b51e427f3e17c9e83227a127ef9b7631 (patch)
tree7e33c460e11590348dd1312b3168dd83789212a9 /src/connections/ethernet
parent24d48b93ab76e255145edf097ebcb84ba70d5cb1 (diff)
downloadnetctl-820d9295b51e427f3e17c9e83227a127ef9b7631.tar.gz
netctl-820d9295b51e427f3e17c9e83227a127ef9b7631.tar.xz
Rework rfkill into re-usable functions
Diffstat (limited to 'src/connections/ethernet')
-rw-r--r--src/connections/ethernet19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet
index dd07667..5414c69 100644
--- a/src/connections/ethernet
+++ b/src/connections/ethernet
@@ -9,7 +9,7 @@ ethernet_up() {
report_fail "interface $INTERFACE does not exist"
return 1
fi
- fi
+ fi
report_debug ethernet_up ifup
set_interface up-old "$INTERFACE"
@@ -20,7 +20,7 @@ ethernet_up() {
return 1
fi
- if checkyesno "${AUTH8021X:-no}"; then
+ if checkyesno "${AUTH8021X:-no}"; then
. "$SUBR_DIR/8021x"
[[ -z "$WPA_CONF" ]] && WPA_CONF="/etc/wpa_supplicant.conf"
[[ -z "$WPA_OPTS" ]] && WPA_OPTS="-Dwired"
@@ -35,7 +35,7 @@ ethernet_up() {
set_interface forcedown-old "$INTERFACE"
report_fail "WPA Authentication/Association Failed"
return 1
- fi
+ fi
fi
case "$IP" in
@@ -48,7 +48,7 @@ ethernet_up() {
return 1
fi
else
- # Clear remaining pid files.
+ # Clear remaining pid files.
rm -f "/var/run/dhcpcd-$INTERFACE".{pid,cache} >/dev/null 2>&1
# If using own dns, tell dhcpcd to NOT replace resolv.conf
[[ -n "$DNS1" || -n "$DNS" ]] && DHCP_OPTIONS="-C resolv.conf $DHCP_OPTIONS"
@@ -58,10 +58,10 @@ ethernet_up() {
if [[ "$PIPESTATUS" -ne 0 ]]; then
report_fail "DHCP IP lease attempt failed."
return 1
- fi
+ fi
fi
if [[ -n "$IFOPTS" ]]; then
- report_debug ethernet_up ifup $IFOPTS
+ report_debug ethernet_up ifup $IFOPTS
ifconfig "$INTERFACE" $IFOPTS
fi
;;
@@ -82,7 +82,7 @@ ethernet_up() {
set_interface forcedown-old "$INTERFACE"
report_fail "Adding gateway $GATEWAY failed."
return 1
- fi
+ fi
fi
;;
*)
@@ -103,7 +103,7 @@ ethernet_up() {
# Generate a new resolv.conf
if [[ -n "$DNS1" || -n "$DNS" ]]; then
- : >/etc/resolv.conf
+ : >/etc/resolv.conf
[[ -n "$DOMAIN" ]] && echo "domain $DOMAIN" >>/etc/resolv.conf
[[ -n "$SEARCH" ]] && echo "search $SEARCH" >>/etc/resolv.conf
[[ -n "$DNS1" ]] && echo "nameserver $DNS1" >>/etc/resolv.conf
@@ -141,7 +141,7 @@ ethernet_down() {
fi
;;
esac
-
+
report_debug ethernet_down ifdown
# ignore quirk nodown---is that appropriate?
# this adds a flush call as well---is that appropriate?
@@ -158,3 +158,4 @@ ethernet_status() {
ethernet_$1 "$2"
exit $?
# vim: set ts=4 et sw=4:
+