Initial commit
This commit is contained in:
commit
35f2972e98
5 changed files with 90 additions and 0 deletions
if-up.d
13
if-up.d/netns
Executable file
13
if-up.d/netns
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -n "${IF_NETNS}" ]; then
|
||||
unshare -m /bin/sh <<-EOF
|
||||
mount --make-rprivate /
|
||||
mount --bind /run/network.${IF_NETNS} /run/network
|
||||
if (ip netns exec ${IF_NETNS} ifquery --list | grep -qx ${IFACE}); then
|
||||
ip netns exec ${IF_NETNS} ifup ${IFACE}
|
||||
fi
|
||||
EOF
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue