Since netplan
does not support the pre-up
scripts, you do have two options here:
Get rid of
netplan
Modify /etc/default/grub and add
netcfg/do_not_use_netplan=true
toGRUB_CMDLINE_LINUX
. Then runupdate-grub
.GRUB_CMDLINE_LINUX="netcfg/do_not_use_netplan=true"
After a reboot /etc/network/interfaces is used again.
Use
networkd
asnetplan
'srenderer
Basically, it is
networkd-dispatcher
which will provide the functionality to call scripts. A detailed description can be found here.