From 7ac0561ab349bb33a1b6bb6c31fb73bbe5ca3dbd Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Wed, 13 Nov 2019 03:15:40 +0000 Subject: Create and document a new VLANOPTS variable. This variable can be used to set custom options to configure the VLAN interface. It does not need to be used in 'normal' operation with a VLAN. --- rc.inet1 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rc.inet1') diff --git a/rc.inet1 b/rc.inet1 index c19571f..66e90a8 100644 --- a/rc.inet1 +++ b/rc.inet1 @@ -271,6 +271,12 @@ if_up() { ((IF_UP == 1)) && /sbin/ip link set dev ${iface} down return fi + while read -r -d \| VLANOPT; do + if [ -n "$VLANOPT" ]; then + debug_log "/sbin/ip link set dev ${1} type vlan $VLANOPT" + /sbin/ip link set dev ${1} type vlan $VLANOPT + fi + done <<<"${VLANOPTS[$i]}|" # The | on the end is required. fi # Set hardware address: if [ -n "${HWADDR[$i]}" ]; then -- cgit v1.2.3