Optimization: use ip -n
over ip netns exec
This saves an exec call.
This commit is contained in:
parent
6517cca2a4
commit
097342bd08
@ -35,7 +35,12 @@ function run
|
||||
|
||||
function netns
|
||||
{
|
||||
if [[ "$1" = 'ip' ]]; then
|
||||
shift
|
||||
run ip -n "$netns" "$@"
|
||||
else
|
||||
run ip netns exec "$netns" "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
run ip addr flush dev "$netns_appvm_if"
|
||||
|
Loading…
Reference in New Issue
Block a user