From 129dec0a8e0d59f1221a44b3bc3f97e4fba03ac5 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Tue, 10 Jul 2012 15:26:18 +0200 Subject: Remove duplicate code --- src/connections/ethernet | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/connections') 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 -- cgit v1.2.3-24-g4f1b