Last active
February 18, 2021 08:37
-
-
Save moesoha/458c6f07cded8a66e0cc0170cad966f9 to your computer and use it in GitHub Desktop.
`ip` in `iproute2` wrapper for `ifupdown`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
if [ -n "$IF_NETNS" ]; then | |
if [ "$1" = "exec" ]; then | |
shift 1 | |
ip netns exec "$IF_NETNS" $@ | |
else | |
ip -n "$IF_NETNS" $@ | |
fi | |
else | |
ip $@ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment