Netplan multiple interfaces

@alowther - Quick question. How would you format your solution for 18.04 to affect multiple interfaces (I’m somewhat of a Linux newb)? I have 3 interfaces and want two of them to be in Promiscuous Mode.

The script defines P_IFACES, a bash array of interfaces. That can be modified to include multiple interface names. Here is a practical change I use on a device with 5 interfaces in promiscuous mode

P_IFACES=( eno2 eno3 eno4 eno5 eno6 )

Here is the full file I actually have deployed, which adds some hacky logging from when I was figuring it out

# cat /etc/networkd-dispatcher/unmanaged.d/50promisc
#!/usr/bin/env bash

echo "promisc $(date)" >> /var/tmp/promisc.log
echo "$IFACE : $AdministrativeState : $OperationalState" >> /var/tmp/promisc.log
P_IFACES=( eno2 eno3 eno4 eno5 eno6 )
for P_IFACE in ${P_IFACES[@]}; do
    if [[ "${IFACE}" == "${P_IFACE}" ]]; then
        echo "doit" >> /var/tmp/promisc.log
        ip link set ${IFACE} up promisc on
    fi
done