diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-12-21 15:29:06 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-11-19 13:35:12 +0000 |
commit | 533c3d5aa5ab34c3916bea39f94dadd02e8940c6 (patch) | |
tree | c13d753022e255cbb7d278205ecf1ff4a3f17b46 | |
parent | 456f30607a7cb5024968b7164c405df8f19c81d4 (diff) | |
download | alpine-conf-533c3d5aa5ab34c3916bea39f94dadd02e8940c6.tar.bz2 alpine-conf-533c3d5aa5ab34c3916bea39f94dadd02e8940c6.tar.xz |
setup-interfaces: fix ip: can't find device 'eth1.3' message
ref #1404
-rwxr-xr-x | setup-interfaces.in | 4 |
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() { |