base-files: bring up vlan interface too
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Mon, 21 Jun 2021 22:45:22 +0000 (00:45 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 22 Jun 2021 21:23:00 +0000 (23:23 +0200)
Vlan subinterface was never brought up when using vlan-based preinit network.
Tested forcing ifname="" before preinit_ip() on a Tp-Link Archer C5v4.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
package/base-files/files/lib/preinit/10_indicate_preinit

index deb5f2ae3a25b89c349d169903baec1369a12ef8..debb3d4480834bdcb3a33cadc0c3164921709048 100644 (file)
@@ -18,6 +18,9 @@ preinit_ip_config() {
        fi
 
        ip link set dev $netdev up
+       if [ -n "$vid" ]; then
+               ip link set dev $1 up
+       fi
        ip -4 address add $pi_ip/$pi_netmask broadcast $pi_broadcast dev $1
 }