diff options
author | Geiger <geigereitan@gmail.com> | 2017-03-05 14:26:15 +0200 |
---|---|---|
committer | Jan Macku <jamacku@redhat.com> | 2021-06-24 12:11:04 +0200 |
commit | 2e8de416fe609b04f2af3995890d9be8276c5e7b (patch) | |
tree | 9ef6ec79a446569ef60d256a7004d7cda7e5fb12 /network-scripts | |
parent | a8212c1b232a902938d0e5ea6a82bd6ae52e861c (diff) | |
download | initscripts-2e8de416fe609b04f2af3995890d9be8276c5e7b.tar initscripts-2e8de416fe609b04f2af3995890d9be8276c5e7b.tar.gz initscripts-2e8de416fe609b04f2af3995890d9be8276c5e7b.tar.bz2 initscripts-2e8de416fe609b04f2af3995890d9be8276c5e7b.tar.xz initscripts-2e8de416fe609b04f2af3995890d9be8276c5e7b.zip |
added veth support
Diffstat (limited to 'network-scripts')
-rwxr-xr-x | network-scripts/ifup-eth | 11 |
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="" |