vlan: Add vlan recipe
From: Lei Yang <[email protected]>
A 802.1q vlan support program,which can be used by virt-test
--- meta-networking/recipes-support/vlan/files/ip | 21 +++++++ .../recipes-support/vlan/files/vlan-post-down | 28 +++++++++ .../recipes-support/vlan/files/vlan-pre-up | 61 ++++++++++++++++++++ meta-networking/recipes-support/vlan/vlan_1.9.bb | 36 ++++++++++++ 4 files changed, 146 insertions(+), 0 deletions(-) create mode 100755 meta-networking/recipes-support/vlan/files/ip create mode 100755 meta-networking/recipes-support/vlan/files/vlan-post-down create mode 100755 meta-networking/recipes-support/vlan/files/vlan-pre-up create mode 100755 meta-networking/recipes-support/vlan/vlan_1.9.bb
meta-networking/recipes-support/vlan/files/ip new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/sh +# This should probably go into ifupdown +# But usually only those with lots of interfaces (vlans) need these +if [ -d "/proc/sys/net/ipv4/conf/$IFACE" ] +then + if [ -n "$IF_IP_PROXY_ARP" ]; then + if [ "$IF_IP_PROXY_ARP" -eq "1" ]; then + echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp" + else + echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp" + fi + fi + if [ -n "$IF_IP_RP_FILTER" ]; then + if [ "$IF_IP_RP_FILTER" -eq "0" ]; then + echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter" + else + echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter" + fi + fi +fi +
meta-networking/recipes-support/vlan/files/vlan-post-down new file +28 -0
@@ -0,0 +1,28 @@ +#!/bin/sh + +# If IFACE is an automagic vlan interface (without the vlan-raw-device +# parameter) then let's try to discover the magic here.. Another way would be +# to just probe for the right device name in /proc/net/vlan + +case "$IFACE" in + # Ignore any alias (#272891) + *:*) + exit 0 + ;; + eth*.0*|bond*.0*|wlan*.0*) + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` + ;; + eth*.*|bond*.*|wlan*.*) + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` + ;; + # Test for vlan raw device (#196890, #292648) + *) + [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 + ;; +esac + +if [ ! -x /sbin/vconfig ]; then + exit 0 +fi + +vconfig rem $IFACE
meta-networking/recipes-support/vlan/files/vlan-pre-up new file +61 -0
61 lines not on this page · raw message
meta-networking/recipes-support/vlan/vlan_1.9.bb new file +36 -0
@@ -0,0 +1,36 @@ +SUMMARY = "802.1q vlan support program" +HOMEPAGE = "http://www.candelatech.com/~greear/vlan.html" +LICENSE = "GPLv2" +SECTION = "console/network" + +SRC_URI[md5sum] = "5f0c6060b33956fb16e11a15467dd394" +SRC_URI[sha256sum] = "3b8f0a1bf0d3642764e5f646e1f3bbc8b1eeec474a77392d9aeb4868842b4cca" +LIC_FILES_CHKSUM = "file://macvlan_config.c;beginline=4;endline=62;md5=dc0660d77e4313e8ccdf256fbe436a63" + +S = "${WORKDIR}/${PN}" + +SRC_URI = " \ + http://www.candelatech.com/~greear/vlan/vlan.${PV}.tar.gz \ + file://ip \ + file://vlan-pre-up \ + file://vlan-post-down \ + " + +CCFLAGS = "-g -D_GNU_SOURCE -Wall -I${STAGING_INCDIR}" +LDLIBS = "" + +do_compile() { + ${CC} ${CCFLAGS} -c vconfig.c + ${CC} ${CCFLAGS} ${LDFLAGS} -o vconfig vconfig.o ${LDLIBS} +} + +do_install() { + install -d "${D}${sbindir}" + install -m 755 "${S}/vconfig" "${D}${sbindir}/vconfig" + install -d ${D}/${sysconfdir}/network/if-pre-up.d + install -d ${D}/${sysconfdir}/network/if-post-down.d + install -d ${D}/${sysconfdir}/network/if-up.d + install -m 0755 ${WORKDIR}/ip ${D}/${sysconfdir}/network/if-up.d/ + install -m 0755 ${WORKDIR}/vlan-pre-up ${D}/${sysconfdir}/network/if-pre-up.d/vlan + install -m 0755 ${WORKDIR}/vlan-post-down ${D}/${sysconfdir}/network/if-post-down.d/vlan +}
Signature · 1 line
1.7.1
Hey Lei,
Quoted 33 lines · [[oe] [meta-networking][PATCH:V2] vlan: Add vlan recipe] On 13.06.18 (Tue…
From: Lei Yang <[email protected]>
A 802.1q vlan support program,which can be used by virt-test
Signed-off-by Lei Yang <[email protected]>--- meta-networking/recipes-support/vlan/files/ip | 21 +++++++ .../recipes-support/vlan/files/vlan-post-down | 28 +++++++++ .../recipes-support/vlan/files/vlan-pre-up | 61 ++++++++++++++++++++ meta-networking/recipes-support/vlan/vlan_1.9.bb | 36 ++++++++++++ 4 files changed, 146 insertions(+), 0 deletions(-) create mode 100755 meta-networking/recipes-support/vlan/files/ip create mode 100755 meta-networking/recipes-support/vlan/files/vlan-post-down create mode 100755 meta-networking/recipes-support/vlan/files/vlan-pre-up create mode 100755 meta-networking/recipes-support/vlan/vlan_1.9.bbmeta-networking/recipes-support/vlan/files/ip new file +11
-0@@ -0,0 +1,21 @@ +#!/bin/sh +# This should probably go into ifupdown +# But usually only those with lots of interfaces (vlans) need these +if [ -d "/proc/sys/net/ipv4/conf/$IFACE" ] +then + if [ -n "$IF_IP_PROXY_ARP" ]; then + if [ "$IF_IP_PROXY_ARP" -eq "1" ]; then + echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp" + else + echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp" + fi
meta-networking/recipes-support/vlan/files/ip line 21
Quoted 10 lines
meta-networking/recipes-support/vlan/files/ip new file +10
-0+ fi + if [ -n "$IF_IP_RP_FILTER" ]; then + if [ "$IF_IP_RP_FILTER" -eq "0" ]; then + echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter" + else + echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter" + fi + fi +fi +
Sorry, I should've caught this in the v1, but what's up with this file? Did you get it out of the vlan package? It's decently isolated with the do_install in the recipe, but it's an exact namespace configuration for a binary from iproute2 and it doesn't appear to do even close to the same thing. Can you expand on where it's from and whether it's practical to give it a less opaque name? I'm mainly asking because I can't convince myself I know which 'ip' you are relying upon (or getting, actually, I think I know which one you're getting...) in vlan-pre-up.
Quoted 114 lines
meta-networking/recipes-support/vlan/files/vlan-post-down new file +28
-0@@ -0,0 +1,28 @@ +#!/bin/sh + +# If IFACE is an automagic vlan interface (without the vlan-raw-device +# parameter) then let's try to discover the magic here.. Another way would be +# to just probe for the right device name in /proc/net/vlan + +case "$IFACE" in + # Ignore any alias (#272891) + *:*) + exit 0 + ;; + eth*.0*|bond*.0*|wlan*.0*) + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` + ;; + eth*.*|bond*.*|wlan*.*) + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` + ;; + # Test for vlan raw device (#196890, #292648) + *) + [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 + ;; +esac + +if [ ! -x /sbin/vconfig ]; then + exit 0 +fi + +vconfig rem $IFACEmeta-networking/recipes-support/vlan/files/vlan-pre-up new file +61
-0@@ -0,0 +1,61 @@ +#!/bin/sh + +# Most of this stuff is to enable vlans + +case "$IFACE" in + # Ignore any alias (#272891) which uses <interface>:<alabel> + *:*) + exit 0 + ;; + vlan0*) + vconfig set_name_type VLAN_PLUS_VID + VLANID=`echo $IFACE|sed "s/vlan0*//"` + ;; + vlan*) + vconfig set_name_type VLAN_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/vlan0*//"` + ;; + eth*.0*|bond*.0*|wlan*.0*) + vconfig set_name_type DEV_PLUS_VID + VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//;s/wlan[0-9][0-9]*\.0*//"` + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` + ;; + eth*.*|bond*.*|wlan*.*) + vconfig set_name_type DEV_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//g;s/wlan[0-9][0-9]*\.0*//g"` + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` + ;; + *.0*) + # Silently ignore interfaces which we do not (know how to) support + [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 + vconfig set_name_type DEV_PLUS_VID + VLANID=`echo $IFACE|sed "s/[^.]*\.0*//g"` + ;; + *.*) + # Silently ignore interfaces which we do not (know how to) support + [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 + vconfig set_name_type DEV_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/[^.]*\.0*//g"` + ;; + + *) + exit 0 + ;; +esac + +if [ -n "$IF_VLAN_RAW_DEVICE" ]; then + if [ ! -x /sbin/vconfig ]; then + exit 0 + fi + if ! ip link show dev "$IF_VLAN_RAW_DEVICE" > /dev/null; then + echo "$IF_VLAN_RAW_DEVICE does not exist, unable to create $IFACE" + exit 1 + fi + ip link set up dev $IF_VLAN_RAW_DEVICE + vconfig add $IF_VLAN_RAW_DEVICE $VLANID +fi + +# This is not vlan specific, and should actually go somewhere else. +if [ -n "$IF_HW_MAC_ADDRESS" ]; then + ip link set $IFACE address $IF_HW_MAC_ADDRESS +fimeta-networking/recipes-support/vlan/vlan_1.9.bb new file +7
-0@@ -0,0 +1,36 @@ +SUMMARY = "802.1q vlan support program" +HOMEPAGE = "http://www.candelatech.com/~greear/vlan.html" +LICENSE = "GPLv2" +SECTION = "console/network" + +SRC_URI[md5sum] = "5f0c6060b33956fb16e11a15467dd394" +SRC_URI[sha256sum] = "3b8f0a1bf0d3642764e5f646e1f3bbc8b1eeec474a77392d9aeb4868842b4cca"
meta-networking/recipes-support/vlan/vlan_1.9.bb line 17
Quoted 10 lines
meta-networking/recipes-support/vlan/vlan_1.9.bb new file +10
-0+LIC_FILES_CHKSUM = "file://macvlan_config.c;beginline=4;endline=62;md5=dc0660d77e4313e8ccdf256fbe436a63" + +S = "${WORKDIR}/${PN}" + +SRC_URI = " \ + http://www.candelatech.com/~greear/vlan/vlan.${PV}.tar.gz \ + file://ip \ + file://vlan-pre-up \ + file://vlan-post-down \ + "
I think Paul had meant to put SRC_URI[...] around here in his request to v1.
-J.
Quoted 19 lines
meta-networking/recipes-support/vlan/vlan_1.9.bb new file +19
-0+ +CCFLAGS = "-g -D_GNU_SOURCE -Wall -I${STAGING_INCDIR}" +LDLIBS = "" + +do_compile() { + ${CC} ${CCFLAGS} -c vconfig.c + ${CC} ${CCFLAGS} ${LDFLAGS} -o vconfig vconfig.o ${LDLIBS} +} + +do_install() { + install -d "${D}${sbindir}" + install -m 755 "${S}/vconfig" "${D}${sbindir}/vconfig" + install -d ${D}/${sysconfdir}/network/if-pre-up.d + install -d ${D}/${sysconfdir}/network/if-post-down.d + install -d ${D}/${sysconfdir}/network/if-up.d + install -m 0755 ${WORKDIR}/ip ${D}/${sysconfdir}/network/if-up.d/ + install -m 0755 ${WORKDIR}/vlan-pre-up ${D}/${sysconfdir}/network/if-pre-up.d/vlan + install -m 0755 ${WORKDIR}/vlan-post-down ${D}/${sysconfdir}/network/if-post-down.d/vlan +}
Signature · 2 lines
-Joe MacDonald. :wq
Hi Joe
On Wed, Jun 19, 2013 at 10:35 PM, Joe MacDonald <[email protected]
Quoted 56 lines
wrote:
Hey Lei,
[[oe] [meta-networking][PATCH:V2] vlan: Add vlan recipe] On 13.06.18 (Tue
Quoted 9 lines · 10:23) [email protected] wrote:
From: Lei Yang <[email protected]>
A 802.1q vlan support program,which can be used by virt-test
Signed-off-by Lei Yang <[email protected]>--- meta-networking/recipes-support/vlan/files/ip | 21 +++++++ .../recipes-support/vlan/files/vlan-post-down | 28 +++++++++ .../recipes-support/vlan/files/vlan-pre-up | 61++++++++++++++++++++
Quoted 4 lines
meta-networking/recipes-support/vlan/vlan_1.9.bb | 36 ++++++++++++ 4 files changed, 146 insertions(+), 0 deletions(-) create mode 100755 meta-networking/recipes-support/vlan/files/ip create mode 100755meta-networking/recipes-support/vlan/files/vlan-post-down
Quoted 1 line
create mode 100755meta-networking/recipes-support/vlan/files/vlan-pre-up
Review
Quoted 3 lines
create mode 100755 meta-networking/recipes-support/vlan/vlan_1.9.bb(quoted diff) +0
-0b/meta-networking/recipes-support/vlan/files/ip
Quoted 16 lines
new file mode 100755
index 0000000..d7de05cmeta-networking/recipes-support/vlan/files/ip new file +11
-0@@ -0,0 +1,21 @@ +#!/bin/sh +# This should probably go into ifupdown +# But usually only those with lots of interfaces (vlans) need these +if [ -d "/proc/sys/net/ipv4/conf/$IFACE" ] +then + if [ -n "$IF_IP_PROXY_ARP" ]; then + if [ "$IF_IP_PROXY_ARP" -eq "1" ]; then + echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp" + else + echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp" + fimeta-networking/recipes-support/vlan/files/ip line 21
Quoted 10 lines
meta-networking/recipes-support/vlan/files/ip new file +10
-0+ fi + if [ -n "$IF_IP_RP_FILTER" ]; then + if [ "$IF_IP_RP_FILTER" -eq "0" ]; then + echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter" + else + echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter" + fi + fi +fi +Sorry, I should've caught this in the v1, but what's up with this file?
Quoted 10 lines
Did you get it out of the vlan package? It's decently isolated with the
do_installin the recipe, but it's an exact namespace configuration for a binary from iproute2 and it doesn't appear to do even close to the same thing. Can you expand on where it's from and whether it's practical to give it a less opaque name? I'm mainly asking because I can't convince myself I know which 'ip' you are relying upon (or getting, actually, I think I know which one you're getting...) in vlan-pre-up.
on my ubuntu desktop
lyang001@lyang001-OptiPlex-9010:~/WORK/leaning-work/git$ dpkg -S /etc/network/if-up.d/ip vlan: /etc/network/if-up.d/ip
lyang001@lyang001-OptiPlex-9010:~/WORK/leaning-work/git$ dpkg -S `which ip` iproute: /sbin/ip
actually I don't check the difference
Quoted 128 lines
Review
Quoted 1 line
(quoted diff) +0
-0b/meta-networking/recipes-support/vlan/files/vlan-post-down
meta-networking/recipes-support/vlan/files/vlan-post-down line 4
Quoted 9 lines
new file mode 100755
index 0000000..89b16fbmeta-networking/recipes-support/vlan/files/vlan-post-down new file +4
-0@@ -0,0 +1,28 @@ +#!/bin/sh + +# If IFACE is an automagic vlan interface (without the vlan-raw-device +# parameter) then let's try to discover the magic here.. Another waywould be
meta-networking/recipes-support/vlan/files/vlan-post-down
Quoted 9 lines
meta-networking/recipes-support/vlan/files/vlan-post-down new file +9
-0+# to just probe for the right device name in /proc/net/vlan + +case "$IFACE" in + # Ignore any alias (#272891) + *:*) + exit 0 + ;; + eth*.0*|bond*.0*|wlan*.0*) + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed"s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"`
meta-networking/recipes-support/vlan/files/vlan-post-down
Quoted 3 lines
meta-networking/recipes-support/vlan/files/vlan-post-down new file +3
-0+ ;; + eth*.*|bond*.*|wlan*.*) + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed"s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"`
Review
Quoted 13 lines
meta-networking/recipes-support/vlan/files/vlan-post-down new file +12
-0+ ;; + # Test for vlan raw device (#196890, #292648) + *) + [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 + ;; +esac + +if [ ! -x /sbin/vconfig ]; then + exit 0 +fi + +vconfig rem $IFACE(quoted diff) +0
-0b/meta-networking/recipes-support/vlan/files/vlan-pre-up
Quoted 15 lines
new file mode 100755
index 0000000..b977be8meta-networking/recipes-support/vlan/files/vlan-pre-up new file +10
-0@@ -0,0 +1,61 @@ +#!/bin/sh + +# Most of this stuff is to enable vlans + +case "$IFACE" in + # Ignore any alias (#272891) which uses <interface>:<alabel> + *:*) + exit 0 + ;; + vlan0*)meta-networking/recipes-support/vlan/files/vlan-pre-up line 20
Quoted 10 lines
meta-networking/recipes-support/vlan/files/vlan-pre-up new file +10
-0+ vconfig set_name_type VLAN_PLUS_VID + VLANID=`echo $IFACE|sed "s/vlan0*//"` + ;; + vlan*) + vconfig set_name_type VLAN_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/vlan0*//"` + ;; + eth*.0*|bond*.0*|wlan*.0*) + vconfig set_name_type DEV_PLUS_VID + VLANID=`echo $IFACE|sed"s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//;s/wlan[0-9][0-9]*\.0*//"`
meta-networking/recipes-support/vlan/files/vlan-pre-up line 21
Quoted 1 line
meta-networking/recipes-support/vlan/files/vlan-pre-up new file +1
-0+ IF_VLAN_RAW_DEVICE=`echo $IFACE|sed"s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"`
meta-networking/recipes-support/vlan/files/vlan-pre-up
Quoted 4 lines
meta-networking/recipes-support/vlan/files/vlan-pre-up new file +4
-0+ ;; + eth*.*|bond*.*|wlan*.*) + vconfig set_name_type DEV_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed"s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//g;s/wlan[0-9][0-9]*\.0*//g"`
meta-networking/recipes-support/vlan/files/vlan-pre-up line 26
Quoted 1 line
meta-networking/recipes-support/vlan/files/vlan-pre-up new file +1
-0+ IF_VLAN_RAW_DEVICE=`echo $IFACE|sed"s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"`
Quoted 15 lines
meta-networking/recipes-support/vlan/files/vlan-pre-up new file +15
-0+ ;; + *.0*) + # Silently ignore interfaces which we do not (know how to) support + [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 + vconfig set_name_type DEV_PLUS_VID + VLANID=`echo $IFACE|sed "s/[^.]*\.0*//g"` + ;; + *.*) + # Silently ignore interfaces which we do not (know how to) support + [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 + vconfig set_name_type DEV_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/[^.]*\.0*//g"` + ;; + + *)meta-networking/recipes-support/vlan/files/vlan-pre-up
Quoted 10 lines
meta-networking/recipes-support/vlan/files/vlan-pre-up new file +10
-0+ exit 0 + ;; +esac + +if [ -n "$IF_VLAN_RAW_DEVICE" ]; then + if [ ! -x /sbin/vconfig ]; then + exit 0 + fi + if ! ip link show dev "$IF_VLAN_RAW_DEVICE" > /dev/null; then + echo "$IF_VLAN_RAW_DEVICE does not exist, unable to create$IFACE"
Review
Quoted 11 lines
meta-networking/recipes-support/vlan/files/vlan-pre-up new file +10
-0+ exit 1 + fi + ip link set up dev $IF_VLAN_RAW_DEVICE + vconfig add $IF_VLAN_RAW_DEVICE $VLANID +fi + +# This is not vlan specific, and should actually go somewhere else. +if [ -n "$IF_HW_MAC_ADDRESS" ]; then + ip link set $IFACE address $IF_HW_MAC_ADDRESS +fi(quoted diff) +0
-0vlan_1.9.bb
meta-networking/recipes-support/vlan/vlan_1.9.bb line 7
Quoted 12 lines
new file mode 100755
index 0000000..b79da6emeta-networking/recipes-support/vlan/vlan_1.9.bb new file +7
-0@@ -0,0 +1,36 @@ +SUMMARY = "802.1q vlan support program" +HOMEPAGE = "http://www.candelatech.com/~greear/vlan.html" +LICENSE = "GPLv2" +SECTION = "console/network" + +SRC_URI[md5sum] = "5f0c6060b33956fb16e11a15467dd394" +SRC_URI[sha256sum] ="
3b8f0a1bf0d3642764e5f646e1f3bbc8b1eeec474a77392d9aeb4868842b4cca"meta-networking/recipes-support/vlan/vlan_1.9.bb line 8
Quoted 1 line
meta-networking/recipes-support/vlan/vlan_1.9.bb new file +1
-0+LIC_FILES_CHKSUM ="file://macvlan_config.c;beginline=4;endline=62;md5=dc0660d77e4313e8ccdf256fbe436a63"
Quoted 14 lines
meta-networking/recipes-support/vlan/vlan_1.9.bb line 17
Quoted 9 lines
meta-networking/recipes-support/vlan/vlan_1.9.bb new file +9
-0+ +S = "${WORKDIR}/${PN}" + +SRC_URI = " \ + http://www.candelatech.com/~greear/vlan/vlan.${PV}.tar.gz \ + file://ip \ + file://vlan-pre-up \ + file://vlan-post-down \ + "I think Paul had meant to put SRC_URI[...] around here in his request to v1.
Aha I mis-uderstand it
Lei
Quoted 33 lines
-J.
Quoted 7 lines
meta-networking/recipes-support/vlan/vlan_1.9.bb new file +7
-0+ +CCFLAGS = "-g -D_GNU_SOURCE -Wall -I${STAGING_INCDIR}" +LDLIBS = "" + +do_compile() { + ${CC} ${CCFLAGS} -c vconfig.c + ${CC} ${CCFLAGS} ${LDFLAGS} -o vconfig vconfig.o ${LDLIBS}meta-networking/recipes-support/vlan/vlan_1.9.bb
Quoted 10 lines
meta-networking/recipes-support/vlan/vlan_1.9.bb new file +10
-0+} + +do_install() { + install -d "${D}${sbindir}" + install -m 755 "${S}/vconfig" "${D}${sbindir}/vconfig" + install -d ${D}/${sysconfdir}/network/if-pre-up.d + install -d ${D}/${sysconfdir}/network/if-post-down.d + install -d ${D}/${sysconfdir}/network/if-up.d + install -m 0755 ${WORKDIR}/ip ${D}/${sysconfdir}/network/if-up.d/ + install -m 0755 ${WORKDIR}/vlan-pre-up${D}/${sysconfdir}/network/if-pre-up.d/vlan
meta-networking/recipes-support/vlan/vlan_1.9.bb line 35
Quoted 1 line
meta-networking/recipes-support/vlan/vlan_1.9.bb new file +1
-0+ install -m 0755 ${WORKDIR}/vlan-post-down${D}/${sysconfdir}/network/if-post-down.d/vlan
meta-networking/recipes-support/vlan/vlan_1.9.bb line 36
Quoted 1 line
meta-networking/recipes-support/vlan/vlan_1.9.bb new file +1
-0+}--
-Joe MacDonald.
:wq_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Quoted 72 lines · [Re: [oe] [meta-networking][PATCH:V2] vlan: Add vlan recipe] On 13.06.20 (Thu…
Hi Joe
On Wed, Jun 19, 2013 at 10:35 PM, Joe MacDonald <[email protected]> wrote:
Hey Lei,
[[oe] [meta-networking][PATCH:V2] vlan: Add vlan recipe] On 13.06.18 (Tue 10:23) [email protected] wrote:
> From: Lei Yang <[email protected]>
>
> A 802.1q vlan support program,which can be used by virt-test >
> Signed-off-by: Lei Yang <[email protected]>
> ---
> meta-networking/recipes-support/vlan/files/ip | 21 +++++++
> .../recipes-support/vlan/files/vlan-post-down | 28 +++++++++
> .../recipes-support/vlan/files/vlan-pre-up | 61
++++++++++++++++++++
> meta-networking/recipes-support/vlan/vlan_1.9.bb | 36 ++++++++++++
> 4 files changed, 146 insertions(+), 0 deletions(-)
> create mode 100755 meta-networking/recipes-support/vlan/files/ip > create mode 100755 meta-networking/recipes-support/vlan/files/ vlan-post-down
> create mode 100755 meta-networking/recipes-support/vlan/files/ vlan-pre-up
> create mode 100755 meta-networking/recipes-support/vlan/vlan_1.9.bb >
> diff --git a/meta-networking/recipes-support/vlan/files/ip b/ meta-networking/recipes-support/vlan/files/ip
> new file mode 100755
> index 0000000..d7de05c
> ---/dev/null
> +++ b/meta-networking/recipes-support/vlan/files/ip
> @@ -0,0 +1,21 @@
> +#!/bin/sh
> +# This should probably go into ifupdown
> +# But usually only those with lots of interfaces (vlans) need these > +if [ -d "/proc/sys/net/ipv4/conf/$IFACE" ]
> +then
> + if [ -n "$IF_IP_PROXY_ARP" ]; then
> + if [ "$IF_IP_PROXY_ARP" -eq "1" ]; then
> + echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp"
> + else
> + echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp"
> + fi
> + fi
> + if [ -n "$IF_IP_RP_FILTER" ]; then
> + if [ "$IF_IP_RP_FILTER" -eq "0" ]; then
> + echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter"
> + else
> + echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter"
> + fi
> + fi
> +fi
> +Sorry, I should've caught this in the v1, but what's up with this file? Did you get it out of the vlan package? It's decently isolated with the
do_installin the recipe, but it's an exact namespace configuration for a binary from iproute2 and it doesn't appear to do even close to the same thing. Can you expand on where it's from and whether it's practical to give it a less opaque name? I'm mainly asking because I can't convince myself I know which 'ip' you are relying upon (or getting, actually, I think I know which one you're getting...) in vlan-pre-up.on my ubuntu desktop
Quoted 8 lines
lyang001@lyang001-OptiPlex-9010:~/WORK/leaning-work/git$ dpkg -S /etc/network/ if-up.d/ip vlan: /etc/network/if-up.d/iplyang001@lyang001-OptiPlex-9010:~/WORK/leaning-work/git$ dpkg -S `which ip` iproute: /sbin/ipactually I don't check the difference
Well, for one:
$ file $(which ip) /bin/ip: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xac673e1884dfbfab74e9f07e23af91c284327916, stripped
:-) (Obviously my system is a bit different from yours, my /sbin/ip -> /bin/ip ...)
Anyway, so I'm still curious, though, if the script that gets installed as part of the vlan package is actually part of the vlan package, why have you broken it out as a separate file? Or is it not part of the package, but a separate script on the web page? Sorry if this is obvious, I really just don't know.
The follow-up question still stands too. What's this thing doing there and does not installing it break something? It probably seems like a trivial point, but I'm genuinely curious about this. It seems really odd and it seems like maybe it's not doing what it was intended to do.
-J.
Quoted 186 lines
Review
Quoted 4 lines
(quoted diff) renamed from meta-networking/recipes-support/vlan/files/vlan-post-down +0
-0meta-networking/recipes-support/vlan/files/vlan-post-down > new file mode 100755 > index 0000000..89b16fb > --- /dev/null > +++ b/meta-networking/recipes-support/vlan/files/vlan-post-down > @@ -0,0 +1,28 @@ > +#!/bin/sh > + > +# If IFACE is an automagic vlan interface (without the vlan-raw-device > +# parameter) then let's try to discover the magic here.. Another way would be > +# to just probe for the right device name in /proc/net/vlan > + > +case "$IFACE" in > + # Ignore any alias (#272891) > + *:*) > + exit 0 > + ;; > + eth*.0*|bond*.0*|wlan*.0*) > + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/ \(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` > + ;; > + eth*.*|bond*.*|wlan*.*) > + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/ \(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` > + ;; > + # Test for vlan raw device (#196890, #292648) > + *) > + [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 > + ;; > +esac > + > +if [ ! -x /sbin/vconfig ]; then > + exit 0 > +fi > + > +vconfig rem $IFACE > diff --git a/meta-networking/recipes-support/vlan/files/vlan-pre-up b/ meta-networking/recipes-support/vlan/files/vlan-pre-up > new file mode 100755 > index 0000000..b977be8 > --- /dev/null > +++ b/meta-networking/recipes-support/vlan/files/vlan-pre-up > @@ -0,0 +1,61 @@ > +#!/bin/sh > + > +# Most of this stuff is to enable vlans > + > +case "$IFACE" in > + # Ignore any alias (#272891) which uses <interface>:<alabel> > + *:*) > + exit 0 > + ;; > + vlan0*) > + vconfig set_name_type VLAN_PLUS_VID > + VLANID=`echo $IFACE|sed "s/vlan0*//"` > + ;; > + vlan*) > + vconfig set_name_type VLAN_PLUS_VID_NO_PAD > + VLANID=`echo $IFACE|sed "s/vlan0*//"` > + ;; > + eth*.0*|bond*.0*|wlan*.0*) > + vconfig set_name_type DEV_PLUS_VID > + VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]* \.0*//;s/wlan[0-9][0-9]*\.0*//"` > + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/ \(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` > + ;; > + eth*.*|bond*.*|wlan*.*) > + vconfig set_name_type DEV_PLUS_VID_NO_PAD > + VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]* \.0*//g;s/wlan[0-9][0-9]*\.0*//g"` > + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/ \(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` > + ;; > + *.0*) > + # Silently ignore interfaces which we do not (know how to) support > + [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 > + vconfig set_name_type DEV_PLUS_VID > + VLANID=`echo $IFACE|sed "s/[^.]*\.0*//g"` > + ;; > + *.*) > + # Silently ignore interfaces which we do not (know how to) support > + [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 > + vconfig set_name_type DEV_PLUS_VID_NO_PAD > + VLANID=`echo $IFACE|sed "s/[^.]*\.0*//g"` > + ;; > + > + *) > + exit 0 > + ;; > +esac > + > +if [ -n "$IF_VLAN_RAW_DEVICE" ]; then > + if [ ! -x /sbin/vconfig ]; then > + exit 0 > + fi > + if ! ip link show dev "$IF_VLAN_RAW_DEVICE" > /dev/null; then > + echo "$IF_VLAN_RAW_DEVICE does not exist, unable to create $IFACE" > + exit 1 > + fi > + ip link set up dev $IF_VLAN_RAW_DEVICE > + vconfig add $IF_VLAN_RAW_DEVICE $VLANID > +fi > + > +# This is not vlan specific, and should actually go somewhere else. > +if [ -n "$IF_HW_MAC_ADDRESS" ]; then > + ip link set $IFACE address $IF_HW_MAC_ADDRESS > +fi > diff --git a/meta-networking/recipes-support/vlan/vlan_1.9.bb b/ meta-networking/recipes-support/vlan/vlan_1.9.bb > new file mode 100755 > index 0000000..b79da6e > --- /dev/null > +++ b/meta-networking/recipes-support/vlan/vlan_1.9.bb > @@ -0,0 +1,36 @@ > +SUMMARY = "802.1q vlan support program" > +HOMEPAGE = "http://www.candelatech.com/~greear/vlan.html" > +LICENSE = "GPLv2" > +SECTION = "console/network" > + > +SRC_URI[md5sum] = "5f0c6060b33956fb16e11a15467dd394" > +SRC_URI[sha256sum] = "3b8f0a1bf0d3642764e5f646e1f3bbc8b1eeec474a77392d9aeb4868842b4cca" > +LIC_FILES_CHKSUM = "file://macvlan_config.c;beginline=4;endline=62;md5= dc0660d77e4313e8ccdf256fbe436a63" > + > +S = "${WORKDIR}/${PN}" > + > +SRC_URI = " \ > + http://www.candelatech.com/~greear/vlan/vlan.${PV}.tar.gz \ > + file://ip \ > + file://vlan-pre-up \ > + file://vlan-post-down \ > + " I think Paul had meant to put SRC_URI[...] around here in his request to v1.Aha I mis-uderstand it
Lei
-J. > + > +CCFLAGS = "-g -D_GNU_SOURCE -Wall -I${STAGING_INCDIR}" > +LDLIBS = "" > + > +do_compile() { > + ${CC} ${CCFLAGS} -c vconfig.c > + ${CC} ${CCFLAGS} ${LDFLAGS} -o vconfig vconfig.o ${LDLIBS} > +} > + > +do_install() { > + install -d "${D}${sbindir}" > + install -m 755 "${S}/vconfig" "${D}${sbindir}/vconfig" > + install -d ${D}/${sysconfdir}/network/if-pre-up.d > + install -d ${D}/${sysconfdir}/network/if-post-down.d > + install -d ${D}/${sysconfdir}/network/if-up.d > + install -m 0755 ${WORKDIR}/ip ${D}/${sysconfdir}/network/if-up.d/ > + install -m 0755 ${WORKDIR}/vlan-pre-up ${D}/${sysconfdir}/network/ if-pre-up.d/vlan > + install -m 0755 ${WORKDIR}/vlan-post-down ${D}/${sysconfdir}/ network/if-post-down.d/vlan > +} -- -Joe MacDonald. :wq _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 2 lines
-Joe MacDonald. :wq
I read this page
http://rpm.pbone.net/index.php3/stat/4/idpl/15627532/dir/opensuse_11.x/com/vlan-1.9-124.1.x86_64.rpm.html
and then I think I should remove them to keep it clean, thanks for the advice
Lei
On Thu, Jun 20, 2013 at 11:58 PM, Joe MacDonald <[email protected]
Quoted 332 lines
wrote:
[Re: [oe] [meta-networking][PATCH:V2] vlan: Add vlan recipe] On 13.06.20
Quoted 3 lines · (Thu 23:47) lei yang wrote:
Hi Joe
On Wed, Jun 19, 2013 at 10:35 PM, Joe MacDonald <
Quoted 5 lines
wrote:
Hey Lei, [[oe] [meta-networking][PATCH:V2] vlan: Add vlan recipe] On 13.06.18(Tue
Quoted 10 lines
10:23) [email protected] wrote:
> From: Lei Yang <[email protected]>
>
> A 802.1q vlan support program,which can be used by virt-test >
> Signed-off-by: Lei Yang <[email protected]> > ---
> meta-networking/recipes-support/vlan/files/ip | 21 +++++++
> .../recipes-support/vlan/files/vlan-post-down | 28+++++++++
Quoted 3 lines
Quoted 1 line
.../recipes-support/vlan/files/vlan-pre-up | 61++++++++++++++++++++
> meta-networking/recipes-support/vlan/vlan_1.9.bb | 36++++++++++++
Quoted 7 lines
Quoted 3 lines
4 files changed, 146 insertions(+), 0 deletions(-) create mode 100755 meta-networking/recipes-support/vlan/files/ip create mode 100755 meta-networking/recipes-support/vlan/files/vlan-post-down
> create mode 100755 meta-networking/recipes-support/vlan/files/ vlan-pre-up
> create mode 100755 meta-networking/recipes-support/vlan/vlan_1.9.bb
Quoted 11 lines
Review
Quoted 2 lines
(quoted diff) renamed from meta-networking/recipes-support/vlan/files/ip +0
-0meta-networking/recipes-support/vlan/files/ip > new file mode 100755 > index 0000000..d7de05c > --- /dev/null > +++ b/meta-networking/recipes-support/vlan/files/ip > @@ -0,0 +1,21 @@ > +#!/bin/sh > +# This should probably go into ifupdown > +# But usually only those with lots of interfaces (vlans) needthese
Quoted 5 lines
meta-networking/recipes-support/vlan/files/ip
Quoted 5 lines
meta-networking/recipes-support/vlan/files/ip new file +5
-0+if [ -d "/proc/sys/net/ipv4/conf/$IFACE" ] +then + if [ -n "$IF_IP_PROXY_ARP" ]; then + if [ "$IF_IP_PROXY_ARP" -eq "1" ]; then + echo 1 >"
/proc/sys/net/ipv4/conf/$IFACE/proxy_arp"Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ else + echo 0 >"
/proc/sys/net/ipv4/conf/$IFACE/proxy_arp"Quoted 5 lines
meta-networking/recipes-support/vlan/files/ip
Quoted 5 lines
meta-networking/recipes-support/vlan/files/ip new file +5
-0+ fi + fi + if [ -n "$IF_IP_RP_FILTER" ]; then + if [ "$IF_IP_RP_FILTER" -eq "0" ]; then + echo 0 >"
/proc/sys/net/ipv4/conf/$IFACE/rp_filter"Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ else + echo 1 >"
/proc/sys/net/ipv4/conf/$IFACE/rp_filter"Quoted 6 lines
meta-networking/recipes-support/vlan/files/ip line 21
Quoted 4 lines
meta-networking/recipes-support/vlan/files/ip new file +4
-0+ fi + fi +fi +Sorry, I should've caught this in the v1, but what's up with this
file?
Quoted 1 line
Did you get it out of the vlan package? It's decently isolated with
the
Quoted 1 line
do_installin the recipe, but it's an exact namespace configurationfor
Quoted 9 lines
a binary from iproute2 and it doesn't appear to do even close to the same thing. Can you expand on where it's from and whether it's practical to give it a less opaque name? I'm mainly asking because I can't convince myself I know which 'ip' you are relying upon (or getting, actually, I think I know which one you're getting...) in vlan-pre-up.
Quoted 3 lines
on my ubuntu desktop
lyang001@lyang001-OptiPlex-9010:~/WORK/leaning-work/git$ dpkg -S
/etc/network/Quoted 4 lines
if-up.d/ip
vlan:/etc/network/if-up.d/iplyang001@lyang001-OptiPlex-9010:~/WORK/leaning-work/git$ dpkg -S `whichip`
Quoted 3 lines
iproute:
/sbin/ipactually I don't check the difference
Well, for one:
$ file $(which ip) /bin/ip: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xac673e1884dfbfab74e9f07e23af91c284327916, stripped:-) (Obviously my system is a bit different from yours, my
/sbin/ip->/bin/ip...)Anyway, so I'm still curious, though, if the script that gets installed as part of the vlan package is actually part of the vlan package, why have you broken it out as a separate file? Or is it not part of the package, but a separate script on the web page? Sorry if this is obvious, I really just don't know.
The follow-up question still stands too. What's this thing doing there and does not installing it break something? It probably seems like a trivial point, but I'm genuinely curious about this. It seems really odd and it seems like maybe it's not doing what it was intended to do.
-J.
Quoted 4 lines
Quoted 4 lines
diff --git
a/meta-networking/recipes-support/vlan/files/vlan-post-down b/
Quoted 9 lines
meta-networking/recipes-support/vlan/files/vlan-post-down > new file mode 100755 > index 0000000..89b16fb > --- /dev/null > +++ b/meta-networking/recipes-support/vlan/files/vlan-post-down > @@ -0,0 +1,28 @@ > +#!/bin/sh > + > +# If IFACE is an automagic vlan interface (without thevlan-raw-device
Quoted 1 line
Quoted 1 line
+# parameter) then let's try to discover the magic here.. Another
way
Quoted 10 lines
would be > +# to just probe for the right device name in /proc/net/vlan > + > +case "$IFACE" in > + # Ignore any alias (#272891) > + *:*) > + exit 0 > + ;; > + eth*.0*|bond*.0*|wlan*.0*) > + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed"s/\(eth[0-9][0-9]*\)\..*/\1/;s/
Quoted 4 lines
\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` > + ;; > + eth*.*|bond*.*|wlan*.*) > + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed"s/\(eth[0-9][0-9]*\)\..*/\1/;s/
Quoted 6 lines
\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` > + ;; > + # Test for vlan raw device (#196890, #292648) > + *) > + [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 > + ;;Quoted 8 lines
> +esac > + > +if [ ! -x /sbin/vconfig ]; then > + exit 0 > +fi > + > +vconfig rem $IFACE > diff --gita/meta-networking/recipes-support/vlan/files/vlan-pre-up b/
Quoted 18 lines
meta-networking/recipes-support/vlan/files/vlan-pre-up > new file mode 100755 > index 0000000..b977be8 > --- /dev/null > +++ b/meta-networking/recipes-support/vlan/files/vlan-pre-up > @@ -0,0 +1,61 @@ > +#!/bin/sh > + > +# Most of this stuff is to enable vlans > + > +case "$IFACE" in > + # Ignore any alias (#272891) which uses <interface>:<alabel> > + *:*) > + exit 0 > + ;; > + vlan0*) > + vconfig set_name_type VLAN_PLUS_VID > + VLANID=`echo $IFACE|sed "s/vlan0*//"`Quoted 8 lines
> + ;; > + vlan*) > + vconfig set_name_type VLAN_PLUS_VID_NO_PAD > + VLANID=`echo $IFACE|sed "s/vlan0*//"` > + ;; > + eth*.0*|bond*.0*|wlan*.0*) > + vconfig set_name_type DEV_PLUS_VID > + VLANID=`echo $IFACE|sed"s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*
Quoted 2 lines
\.0*//;s/wlan[0-9][0-9]*\.0*//"`
> + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed"s/\(eth[0-9][0-9]*\)\..*/\1/;s/
Quoted 5 lines
\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` > + ;; > + eth*.*|bond*.*|wlan*.*) > + vconfig set_name_type DEV_PLUS_VID_NO_PAD > + VLANID=`echo $IFACE|sed"s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*
Quoted 2 lines
\.0*//g;s/wlan[0-9][0-9]*\.0*//g"`
> + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed"s/\(eth[0-9][0-9]*\)\..*/\1/;s/
Quoted 4 lines
\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"` > + ;; > + *.0*) > + # Silently ignore interfaces which we do not (know how to)support
Quoted 6 lines
meta-networking/recipes-support/vlan/files/vlan-pre-up
Quoted 6 lines
meta-networking/recipes-support/vlan/files/vlan-pre-up new file +6
-0+ [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 + vconfig set_name_type DEV_PLUS_VID + VLANID=`echo $IFACE|sed "s/[^.]*\.0*//g"` + ;; + *.*) + # Silently ignore interfaces which we do not (know how to)support
Quoted 16 lines
Quoted 6 lines
meta-networking/recipes-support/vlan/files/vlan-pre-up new file +6
-0+ [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 + vconfig set_name_type DEV_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/[^.]*\.0*//g"` + ;; + + *)meta-networking/recipes-support/vlan/files/vlan-pre-up
Quoted 10 lines
meta-networking/recipes-support/vlan/files/vlan-pre-up new file +10
-0+ exit 0 + ;; +esac + +if [ -n "$IF_VLAN_RAW_DEVICE" ]; then + if [ ! -x /sbin/vconfig ]; then + exit 0 + fi + if ! ip link show dev "$IF_VLAN_RAW_DEVICE" > /dev/null; then + echo "$IF_VLAN_RAW_DEVICE does not exist, unable to createQuoted 8 lines
$IFACE"
> + exit 1
> + fi
> + ip link set up dev $IF_VLAN_RAW_DEVICE
> + vconfig add $IF_VLAN_RAW_DEVICE $VLANID
> +fi
> +
> +# This is not vlan specific, and should actually go somewhereelse.
Quoted 11 lines
Review
Quoted 4 lines
meta-networking/recipes-support/vlan/files/vlan-pre-up new file +3
-0+if [ -n "$IF_HW_MAC_ADDRESS" ]; then + ip link set $IFACE address $IF_HW_MAC_ADDRESS +fi(quoted diff) renamed from meta-networking/recipes-support/vlan/vlan_1.9.bb +0
-0meta-networking/recipes-support/vlan/vlan_1.9.bb > new file mode 100755 > index 0000000..b79da6e > --- /dev/null > +++ b/meta-networking/recipes-support/vlan/vlan_1.9.bb > @@ -0,0 +1,36 @@ > +SUMMARY = "802.1q vlan support program"Quoted 8 lines
> +HOMEPAGE = "http://www.candelatech.com/~greear/vlan.html" > +LICENSE = "GPLv2" > +SECTION = "console/network" > + > +SRC_URI[md5sum] = "5f0c6060b33956fb16e11a15467dd394" > +SRC_URI[sha256sum] = "3b8f0a1bf0d3642764e5f646e1f3bbc8b1eeec474a77392d9aeb4868842b4cca" > +LIC_FILES_CHKSUM ="file://macvlan_config.c;beginline=4;endline=62;md5=
Quoted 4 lines
dc0660d77e4313e8ccdf256fbe436a63" > + > +S = "${WORKDIR}/${PN}" > +Quoted 8 lines
> +SRC_URI = " \ > + http://www.candelatech.com/~greear/vlan/vlan.${PV}.tar.gz \ > + file://ip \ > + file://vlan-pre-up \ > + file://vlan-post-down \ > + " I think Paul had meant to put SRC_URI[...] around here in hisrequest to
Quoted 20 lines
v1.Aha I mis-uderstand it
Lei
-J. > + > +CCFLAGS = "-g -D_GNU_SOURCE -Wall -I${STAGING_INCDIR}" > +LDLIBS = "" > + > +do_compile() { > + ${CC} ${CCFLAGS} -c vconfig.c > + ${CC} ${CCFLAGS} ${LDFLAGS} -o vconfig vconfig.o ${LDLIBS} > +}Quoted 8 lines
> + > +do_install() { > + install -d "${D}${sbindir}" > + install -m 755 "${S}/vconfig" "${D}${sbindir}/vconfig" > + install -d ${D}/${sysconfdir}/network/if-pre-up.d > + install -d ${D}/${sysconfdir}/network/if-post-down.d > + install -d ${D}/${sysconfdir}/network/if-up.d > + install -m 0755 ${WORKDIR}/ip${D}/${sysconfdir}/network/if-up.d/
Quoted 1 line
Quoted 1 line
+ install -m 0755 ${WORKDIR}/vlan-pre-up
${D}/${sysconfdir}/network/
Quoted 4 lines
if-pre-up.d/vlan > + install -m 0755 ${WORKDIR}/vlan-post-down ${D}/${sysconfdir}/ network/if-post-down.d/vlan > +}Quoted 11 lines
-- -Joe MacDonald. :wq _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel--
-Joe MacDonald.
:wq