summaryrefslogtreecommitdiff
path: root/setup-interfaces.in
diff options
context:
space:
mode:
Diffstat (limited to 'setup-interfaces.in')
-rwxr-xr-xsetup-interfaces.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup-interfaces.in b/setup-interfaces.in
index c4ffa47..263beec 100755
--- a/setup-interfaces.in
+++ b/setup-interfaces.in
@@ -73,7 +73,9 @@ get_default_mask() {
}
get_default_gateway() {
- ip route show dev $1 | awk '/^default/ {print $3}'
+ if iface_exists $1; then
+ ip route show dev $1 | awk '/^default/ {print $3}'
+ fi
}
ipaddr_help() {