selftest: txtimestamp: fix net ns entry logic
According to 'man 8 ip-netns', if `ip netns identify` returns an empty string, there's no net namespace associated with current PID: fix the net ns entrance logic. Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
785ed9c32a
commit
b346c0c858
@ -75,7 +75,7 @@ main() {
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ "$(ip netns identify)" == "root" ]]; then
|
||||
if [[ -z "$(ip netns identify)" ]]; then
|
||||
./in_netns.sh $0 $@
|
||||
else
|
||||
main $@
|
||||
|
Loading…
Reference in New Issue
Block a user