]>
git.proxmox.com Git - pve-firewall.git/blob - debian/ifupdown.sh
b0ad90d5414dc69930947e8d970e32b7b6c8816e
3 # create a VETH device and plug it into bridge ${IF_VETH_BRIDGETO}
5 if [ -z "${IF_VETH_BRIDGETO}" ]; then
9 if [ ! -x /sbin
/brctl
]
14 if [ "${MODE}" = "start" ]; then
15 test -d "/sys/class/net/${IF_VETH_BRIDGETO}" || ifup
"${IF_VETH_BRIDGETO}" ||
exit 1
16 ip link add name
"${IFACE}" type veth peer name
"${IFACE}peer" ||
exit 1
17 ip link
set "${IFACE}peer" up ||
exit 1
18 brctl addif
"${IF_VETH_BRIDGETO}" "${IFACE}peer" ||
exit 1
19 elif [ "${MODE}" = "stop" ]; then
20 brctl delif
"${IF_VETH_BRIDGETO}" "${IFACE}peer"
21 ip link
set "${IFACE}peer" down ||
exit 1
22 ip link del
"${IFACE}" ||
exit 1