I am trying to add a ppp network to systemd_networkd and get the following errors.
error: cannot read snap file: layout “/run/systemd/network/10-netplan-ppp0.network” in an off-limits area
cannot update snap namespace: cannot write to “/etc/systemd/network/10-netplan-ppp0.network” because it would affect the host in “/etc/systemd/network” snap-update-ns failed with code 1: File exists
how exactly are you “trying” this, please give a bit more information …
normally you’d use the network-manager/modem-manager snaps to set up ppp, then use the network-manager interface from your application snap via nmcli commands …
I have staged in my snap
#
stage-packages:
- wvdial
I am using a 4G radio module.
wvdial brings in pppd and other ppp support items.
I layout ppp items in write area #needs to be in read/write #our startup script will copy from $SNAP/etc/ppp/ to $SNAP_DATA/etc/ppp
/etc/ppp:
bind: $SNAP_DATA/etc/ppp
# wvdial
/etc/chatscripts:
bind: $SNAP/etc/chatscripts
/etc/init.d/pppd-dns:
bind-file: $SNAP/etc/init.d/pppd-dns
/etc/logrotate.d/ppp:
bind-file: $SNAP/etc/logrotate.d/ppp
/etc/pam.d/ppp:
bind-file: $SNAP/etc/pam.d/ppp #needs to be in read/write #our startup script will copy from $SNAP/etc/ppp/ to $SNAP_DATA/etc/ppp
/etc/ppp:
bind: $SNAP_DATA/etc/ppp
When my snap runs, i then copy $SNAP/etc/ppp to $SNAP_DATA/etc/ppp, and run wvdial.
${SNAP}/usr/bin/wvdial -C ${SNAP_DATA}/wvdial.conf ${MODEM} &
systemctl restart systemd-networkd.service
The ppp0 interface comes up, but the default route is still eth0.
So I think if I update /run/systemd/network with my ppp network information, then restart that might work.