Add Linux CP: create 'dataplane' network namespace, move to init-container.sh to do the plumbing
This commit is contained in:
12
files/init-container.sh
Executable file
12
files/init-container.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CONFIG=${CONFIG:="/etc/vpp/startup.conf"}
|
||||
NETNS=${NETNS:="dataplane"}
|
||||
|
||||
echo "Creating dataplane namespace"
|
||||
/usr/bin/mkdir -p /etc/netns/$NETNS
|
||||
/usr/bin/touch /etc/netns/$NETNS/resolv.conf
|
||||
/usr/sbin/ip netns add $NETNS
|
||||
|
||||
echo "Starting VPP"
|
||||
exec /usr/bin/vpp -c $CONFIG
|
Reference in New Issue
Block a user