Is it possible to apply a new netplan from within a snap?
A bit of an explanation:
I have a web service being hosted from a snap where the user can login and configure this IoT device. One of the options will be to select which WiFi to connect to.
Once the user selects his wifi and saves, a new netplan will be generated.
After which, I will need the new netplan to be loaded upon reboot.
Is that a possibility? If so, what am I looking at?
(this uses the now obsolete udisks2 snap for mounting the usb stick with configs on it, for a new implementation the udisks2 needs to be pulled in and configured as stage-package)
it might be that you can not call netplan apply directly, i think only the dbus interface is actually allowed by network-setup-control, so you want something like:
ubuntu@ubuntu:~/Desktop/netplan snap$ snap run netplan-test.new-netplan
Error org.freedesktop.DBus.Error.AccessDenied: Access to io.netplan.Netplan.Apply() not permitted.