]> git.proxmox.com Git - pve-firewall.git/commitdiff
ifupdown.sh: correctly use ifup instead of ifconfig
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 6 Mar 2014 17:00:53 +0000 (18:00 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 6 Mar 2014 17:00:53 +0000 (18:00 +0100)
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