This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/files/scripts/sonic-netns-exec
SuvarnaMeenakshi 4b8067e913
Multi-ASIC implementation (#3888)
Changes made to support multi-asic platform. Added multi-instance support for swss, syncd, database, bgp, teamd and lldp.
2020-03-31 10:06:19 -07:00

13 lines
229 B
Bash
Executable File

#!/bin/bash
# Wrapper to execute any command in a specific
# network namespace.
# Usage:
# sonic-netns-exec <namespace name> <command to be executed>
NS="$1"
shift
if [ "$NS" != "" ]; then
ip netns exec $NS $@
else
$@
fi