X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=debian%2Fpatches%2F41_vlan_support.patch;fp=debian%2Fpatches%2F41_vlan_support.patch;h=9551b2c2f43c39747a32262c4bec7f7ca9fd69b6;hb=805c2188a4e6faea1c355e52a757954d5d2e6192;hp=0000000000000000000000000000000000000000;hpb=17794fafb28f3d14dd996ea6984b5d0c84a66aca;p=live-boot-grml.git diff --git a/debian/patches/41_vlan_support.patch b/debian/patches/41_vlan_support.patch new file mode 100644 index 0000000..9551b2c --- /dev/null +++ b/debian/patches/41_vlan_support.patch @@ -0,0 +1,57 @@ +--- a/components/9990-cmdline-old ++++ b/components/9990-cmdline-old +@@ -266,6 +266,11 @@ + UNIONTYPE="${_PARAMETER#union=}" + export UNIONTYPE + ;; ++ ++ vlan=*) ++ VLANS="${VLANS} ${_PARAMETER#vlan=}" ++ export VLANS ++ ;; + esac + done + +--- a/components/9990-grml-networking.sh ++++ b/components/9990-grml-networking.sh +@@ -67,10 +67,39 @@ + method="dhcp" + fi + +- cat >> $IFFILE << EOF ++ if [ -n "$VLANS" ] ; then ++ modprobe 8021q ++ ++ # vlan=: ++ for line in $(echo $VLANS | sed 's/ /\n'/) ; do ++ vlandev=${line#*:} ++ vlanid=${line%:*} ++ ++ if [ -n "$vlandev" ] && [ -n "$vlanid" ] ; then ++ case "$vlandev" in ++ "$interface") ++ vlan_raw_dev=$interface ++ interface="${vlandev}.${vlanid}" ++ ;; ++ esac ++ fi ++ done ++ fi ++ ++ if [ -n "$vlan_raw_dev" ] ; then ++ cat >> $IFFILE << EOF ++auto ${interface} ++iface ${interface} inet ${method} ++ vlan-raw-device $vlan_raw_dev ++EOF ++ else ++ cat >> $IFFILE << EOF + allow-hotplug ${interface} + iface ${interface} inet ${method} + EOF ++ fi ++ ++ unset vlandev vlanid vlan_raw_dev # unset variables to have clean state for next device + + # DNS for resolvconf and /etc/resolv.conf + if [ -e "${netconfig}" ]; then