]> git.ipfire.org Git - people/ms/network.git/commitdiff
Don't load 8021q module when we don't need it.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 27 May 2012 13:45:09 +0000 (13:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 27 May 2012 13:45:09 +0000 (13:45 +0000)
functions.virtual

index e0ae39c0f7715850df62a5316b2dd105fc85353a..5fed694498fda90e8619c14724a8f1fdda9827da 100644 (file)
@@ -34,8 +34,6 @@ function virtual_init() {
 EOF
 }
 
-init_register virtual_init
-
 function virtual_create() {
        local port=${1}
        local vid=${2}
@@ -46,6 +44,9 @@ function virtual_create() {
                mac=$(mac_generate)
        fi
 
+       # Initialize the vlan drivers just when we need them.
+       virtual_init
+
        log INFO "Creating virtual device '${newport}' with address '${mac}'."
 
        local oldport=$(virtual_get_by_parent_and_vid ${port} ${vid})