summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2015-01-06 19:05:50 +0100
committerJouke Witteveen <j.witteveen@gmail.com>2015-01-12 22:08:40 +0100
commitf9a86cbf053a91a387499615bc6930548a51a463 (patch)
tree6f7934662595b986466b26fdc3168900142ccd9a
parent4892bac89bd22f065d8d91beb7e0b4b2002b7b5b (diff)
downloadnetctl-f9a86cbf053a91a387499615bc6930548a51a463.tar.gz
netctl-f9a86cbf053a91a387499615bc6930548a51a463.tar.xz
Don't look into routes if we have IP=no
For IP6=no this also implies we do not wait for DAD. For setting routes but no address, use --- IP=static Address=() Routes=(...) ---
-rw-r--r--src/lib/ip4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ip b/src/lib/ip
index f0dec69..2dc67fc 100644
--- a/src/lib/ip
+++ b/src/lib/ip
@@ -82,7 +82,7 @@ ip_set() {
;;
esac
- if [[ $IP ]]; then
+ if [[ $IP != @(|no) ]]; then
# Add static IP routes
for route in "${Routes[@]}"; do
if ! do_debug ip route add $route dev "$Interface"; then
@@ -100,7 +100,7 @@ ip_set() {
fi
fi
- if [[ $IP6 ]]; then
+ if [[ $IP6 != @(|no) ]]; then
if [[ $IP6 == @(stateless|static) ]]; then
for addr in "${Address6[@]}"; do
if ! do_debug ip -6 addr add $addr $(is_yes "${SkipDAD:-no}" && printf nodad) dev "$Interface"; then