summaryrefslogtreecommitdiffstats
path: root/src/connections
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-07-10 15:26:18 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-07-10 15:26:18 +0200
commit129dec0a8e0d59f1221a44b3bc3f97e4fba03ac5 (patch)
tree52bfa74589f161f6de3d2083f39991c86ec00671 /src/connections
parent4fc69bcd399292e688d19dc3569c7e496419ecd6 (diff)
downloadnetctl-129dec0a8e0d59f1221a44b3bc3f97e4fba03ac5.tar.gz
netctl-129dec0a8e0d59f1221a44b3bc3f97e4fba03ac5.tar.xz
Remove duplicate code
Diffstat (limited to 'src/connections')
-rw-r--r--src/connections/ethernet6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet
index 0a70f5d..651df06 100644
--- a/src/connections/ethernet
+++ b/src/connections/ethernet
@@ -17,10 +17,8 @@ ethernet_up() {
load_profile "$1"
SYSCTL_INTERFACE="${INTERFACE/.//}"
- if [[ ! -e "/sys/class/net/$INTERFACE" ]]; then
- if ! echo "$INTERFACE" | grep -F -q ":"; then
- report_iproute "Interface $INTERFACE does not exist"
- fi
+ if ! is_interface "$INTERFACE"; then
+ report_iproute "Interface $INTERFACE does not exist"
fi
# Disable IPv6 before bringing the interface up to prevent SLAAC