]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- added support for selecting macvlan mode
authorAdam Osuchowski <adwol@pld-linux.org>
Fri, 9 Jun 2017 09:42:23 +0000 (11:42 +0200)
committerAdam Osuchowski <adwol@pld-linux.org>
Fri, 9 Jun 2017 09:42:23 +0000 (11:42 +0200)
lib/ifup
sysconfig/interfaces/ifcfg-description

index cac60cff7047e24d4377458df7ceee09b74bc87d..b0c03f57acf94f2ee00e4986f0c6d7dc4fc1d924 100755 (executable)
--- a/lib/ifup
+++ b/lib/ifup
@@ -85,7 +85,7 @@ fi
 
 if [ -n "$MACVLAN_DEV" -a -n "$MACVLAN_MACADDR" ]; then
        ip link del link ${MACVLAN_DEV} ${DEVICE} type macvlan > /dev/null 2>&1
-       ip link add link ${MACVLAN_DEV} address ${MACVLAN_MACADDR} name ${DEVICE} type macvlan
+       ip link add link ${MACVLAN_DEV} address ${MACVLAN_MACADDR} name ${DEVICE} type macvlan ${MACVLAN_MODE:+mode $MACVLAN_MODE}
 fi
 
 # is this device available? (this catches PCMCIA devices for us)
index 967b51eddb44480c308219002972a721be66a2ff..1629ce0df030c4ae7bbdf26d5700db7c69e23260 100644 (file)
@@ -89,6 +89,7 @@ if    DEVICE=eth*; then
        if macvlan
                MACVLAN_DEV=<exitsting base interface eg. eth0>
                MACVLAN_MACADDR=<desired hw address of new interface>
+               MACVLAN_MODE=<desired mode of new interface (private, vepa, bridge, passthru, source)>
        fi
        
 
This page took 0.389882 seconds and 4 git commands to generate.