Comment 1 for bug 1926442

Revision history for this message
Oliver Grawert (ogra) wrote : Re: cannot execute 'netplan generate' from within a snap

there is no direct access to the command, only the dbus service is allowed for security reasons, you can call:

  dbus-send --system \
    --type=method_call \
    --print-reply \
    --dest=io.netplan.Netplan \
    /io/netplan/Netplan io.netplan.Netplan.Apply

when the network-setup-control interface is connected ...

https://github.com/ogra1/config-snap/blob/master/snap/hooks/connect-plug-network-setup-control

is a working example ...