aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2016-10-23 17:04:16 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2016-10-23 17:04:16 -0700
commitc9fcba63eba9760cdbd5effc9a63394a3fa9d3ae (patch)
tree945b3d48f8b571aabba8808184453395357f0467
parentiproute2: clean up error output and make sure it works. (diff)
downloadnetifrc-c9fcba63eba9760cdbd5effc9a63394a3fa9d3ae.tar.gz
netifrc-c9fcba63eba9760cdbd5effc9a63394a3fa9d3ae.tar.bz2
netifrc-c9fcba63eba9760cdbd5effc9a63394a3fa9d3ae.zip
iproute2: error-check the error-behavior input.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--net/iproute2.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh
index b6fd847..408e293 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -198,6 +198,7 @@ _add_address()
info) msgfunc=einfo rc=0 ;;
warn) msgfunc=ewarn rc=0 ;;
error|fatal) msgfunc=eerror rc=1;;
+ *) msgfunc=eerror rc=1 ; eerror "Unknown error behavior: $eh_behavior" ;;
esac
eval $msgfunc "Address ${address}${netmask:+/}${netmask} already existed!"
eval $msgfunc \"$(ip addr show to "${address}/${family_maxnetmask}" dev "${IFACE}" 2>&1)\"
@@ -269,6 +270,7 @@ _add_route()
info) msgfunc=einfo rc=0 ;;
warn) msgfunc=ewarn rc=0 ;;
error|fatal) msgfunc=eerror rc=1;;
+ *) msgfunc=eerror rc=1 ; eerror "Unknown error behavior: $eh_behavior" ;;
esac
eval $msgfunc "Route '$cmd' already existed."
eval $msgfunc \"$(ip $family route show $cmd dev "${IFACE}" 2>&1)\"