This commit is contained in:
Benjamin Collet 2018-12-24 13:31:25 +01:00
parent a59b876c84
commit f5ed5353ec
2 changed files with 21 additions and 6 deletions
if-pre-up.d

View file

@ -11,6 +11,9 @@ then
if [ ! -f /etc/netns/$IF_NETNS/network/interfaces ]; then
touch /etc/netns/$IF_NETNS/network/interfaces
fi
if [ ! -f /etc/netns/$IF_NETNS/resolv.conf ]; then
touch /etc/netns/$IF_NETNS/resolv.conf
fi
mkdir -p /run/network.${IF_NETNS}
rm -rf /run/network.${IF_NETNS}/*
ip netns add ${IF_NETNS}