Developing for NetworkManager on Ubuntu



Hi,

Are there any BKMs on how to hack on the code in Ubuntu?
I compiled my code, replaced the binary but then, when I try to start the service with:

sudo service NetworkManager start

I get

Jun 14 09:55:16 tglu226 NetworkManager[13711]: Cannot create '/usr/local/var/run/NetworkManager': Read-only 
file system
Jun 14 09:55:16 tglu226 systemd[1]: NetworkManager.service: Main process exited, code=exited, status=1/FAILURE

The version that Ubuntu ships for now is 1.22.10.


This is how /lib/systemd/system/NetworkManager.service looks like:

[Unit]
Description=Network Manager
Documentation=man:NetworkManager(8)
Wants=network.target
After=network-pre.target dbus.service
Before=network.target 

[Service]
Type=dbus
BusName=org.freedesktop.NetworkManager
ExecReload=/usr/bin/busctl call org.freedesktop.NetworkManager /org/freedesktop/NetworkManager 
org.freedesktop.NetworkManager Reload u 0
#ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/sbin/NetworkManager --no-daemon
Restart=on-failure
# NM doesn't want systemd to kill its children for it
KillMode=process
CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID 
CAP_SYS_MODULE CAP_AUDIT_WRITE CAP_KILL CAP_SYS_CHROOT

ProtectSystem=true
ProtectHome=read-only

[Install]
WantedBy=multi-user.target
Also=NetworkManager-dispatcher.service

# We want to enable NetworkManager-wait-online.service whenever this service
# is enabled. NetworkManager-wait-online.service has
# WantedBy=network-online.target, so enabling it only has an effect if
# network-online.target itself is enabled or pulled in by some other unit.
Also=NetworkManager-wait-online.service

Any help appreciated 🙂

Thanks.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]