assert isset device
local address
+ local id
local parent
- local tag
# Parse command line arguments
while [ $# -gt 0 ]; do
--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}
# 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
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}
}