提交 b346c0c8 编写于 作者: P Paolo Pisati 提交者: David S. Miller

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: NPaolo Pisati <paolo.pisati@canonical.com>
Acked-by: NWillem de Bruijn <willemb@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 785ed9c3
......@@ -75,7 +75,7 @@ main() {
fi
}
if [[ "$(ip netns identify)" == "root" ]]; then
if [[ -z "$(ip netns identify)" ]]; then
./in_netns.sh $0 $@
else
main $@
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册