]> git.proxmox.com Git - pve-firewall.git/blobdiff - debian/ifupdown.sh
ifupdown.sh: correctly use ifup instead of ifconfig
[pve-firewall.git] / debian / ifupdown.sh
index c124134a395562e8f1629f0dade75d962b48f1da..b0ad90d5414dc69930947e8d970e32b7b6c8816e 100755 (executable)
@@ -12,7 +12,7 @@ then
 fi
 
 if [ "${MODE}" = "start" ]; then
-    ifconfig "${IF_VETH_BRIDGETO}" up || exit 1
+    test -d "/sys/class/net/${IF_VETH_BRIDGETO}" || ifup "${IF_VETH_BRIDGETO}" || exit 1
     ip link add name "${IFACE}" type veth peer name "${IFACE}peer" || exit 1
     ip link set "${IFACE}peer" up || exit 1
     brctl addif "${IF_VETH_BRIDGETO}" "${IFACE}peer" || exit 1