aboutsummaryrefslogtreecommitdiffstats
path: root/network-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'network-scripts')
-rwxr-xr-xnetwork-scripts/ifup-eth11
1 files changed, 11 insertions, 0 deletions
diff --git a/network-scripts/ifup-eth b/network-scripts/ifup-eth
index a4c0d2b4..04861e56 100755
--- a/network-scripts/ifup-eth
+++ b/network-scripts/ifup-eth
@@ -45,6 +45,17 @@ if [ -n "${HWADDR}" ]; then
fi
fi
+# Create veth device
+if [ "${TYPE}" = "Veth" ]; then
+ if [ -z "${PEER}" ]; then
+ net_log $"cannot create veth without peer"
+ exit 1
+ fi
+ if [ ! -d /sys/class/net/${DEVICE} ]; then
+ ip link add ${DEVICE} type veth peer name ${PEER} type veth
+ fi
+fi
+
# If the device is a bridge, create it
if [ "${TYPE}" = "Bridge" ]; then
bridge_opts=""