X-Git-Url: http://git.ipfire.org/?p=people%2Fms%2Fnetwork.git;a=blobdiff_plain;f=src%2Ffunctions%2Ffunctions.vlan;h=9a70c95480e3a99609e3e7e5c66b0a729e5f411f;hp=c542bb5f35c2f45a296a9ff5d4aeea0ad3fcbce6;hb=f24529e498b1c3fe60196c34356e5b005a22ae4c;hpb=5338fb1423a84f9faeb597a2b67606fff1f6d6ab diff --git a/src/functions/functions.vlan b/src/functions/functions.vlan index c542bb5f..9a70c954 100644 --- a/src/functions/functions.vlan +++ b/src/functions/functions.vlan @@ -31,8 +31,8 @@ vlan_create() { assert isset device local address + local id local parent - local tag # Parse command line arguments while [ $# -gt 0 ]; do @@ -40,12 +40,12 @@ vlan_create() { --address=*) address=$(cli_get_val "${1}") ;; + --id=*) + id=$(cli_get_val "${1}") + ;; --parent=*) parent=$(cli_get_val "${1}") ;; - --tag=*) - tag=$(cli_get_val "${1}") - ;; *) error "Unrecognized argument: ${1}" return ${EXIT_ERROR} @@ -80,7 +80,7 @@ vlan_create() { # Make the command local command=( ip link add link "${parent}" name "${device}" - address "${address}" type vlan id "${tag}" + address "${address}" type vlan id "${id}" ) # Run the command @@ -89,7 +89,7 @@ vlan_create() { return ${EXIT_ERROR} fi - log DEBUG "Created VLAN device ${device} (parent = ${parent}, id = ${tag})" + log DEBUG "Created VLAN device ${device} (parent = ${parent}, id = ${id})" return ${EXIT_OK} }