Signed-off-by: Juergen Borleis <juer...@kreuzholzen.de>
---
 .../usr/lib/systemd/system/NetworkManager-unmanage.service    | 1 +
 projectroot/usr/lib/systemd/system/NetworkManager.service     | 1 +
 rules/networkmanager.in                                       | 4 ++++
 3 files changed, 6 insertions(+)

diff --git a/projectroot/usr/lib/systemd/system/NetworkManager-unmanage.service 
b/projectroot/usr/lib/systemd/system/NetworkManager-unmanage.service
index 180af2992..fd11686ba 100644
--- a/projectroot/usr/lib/systemd/system/NetworkManager-unmanage.service
+++ b/projectroot/usr/lib/systemd/system/NetworkManager-unmanage.service
@@ -7,6 +7,7 @@ ConditionPathExists=!/var/run/NetworkManager.conf
 [Service]
 Type=oneshot
 ExecStart=/usr/lib/init/nm-unmanage.sh
+StateDirectory=NetworkManager
 
 [Install]
 WantedBy=NetworkManager.service
diff --git a/projectroot/usr/lib/systemd/system/NetworkManager.service 
b/projectroot/usr/lib/systemd/system/NetworkManager.service
index 7c56d8e24..45973692d 100644
--- a/projectroot/usr/lib/systemd/system/NetworkManager.service
+++ b/projectroot/usr/lib/systemd/system/NetworkManager.service
@@ -21,6 +21,7 @@ CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE 
CAP_NET_RAW CAP_NET_BIND_SE
 
 ProtectSystem=true
 ProtectHome=read-only
+StateDirectory=NetworkManager
 
 [Install]
 WantedBy=multi-user.target
diff --git a/rules/networkmanager.in b/rules/networkmanager.in
index 26e9fff9d..e966aa2c7 100644
--- a/rules/networkmanager.in
+++ b/rules/networkmanager.in
@@ -26,6 +26,7 @@ menuconfig NETWORKMANAGER
        select UDEV_LIBUDEV
        select WPA_SUPPLICANT                   if NETWORKMANAGER_WIRELESS && 
RUNTIME
        select WPA_SUPPLICANT_CTRL_IFACE_DBUS   if NETWORKMANAGER_WIRELESS && 
RUNTIME
+       select ROOTFS_VAR_LIB                   if RUNTIME
        prompt "networkmanager                "
        help
          NetworkManager is a tool to automate network configuration as far as
@@ -33,6 +34,9 @@ menuconfig NETWORKMANAGER
 
          http://projects.gnome.org/NetworkManager/
 
+         Note: on a read-only root filesystem this package still requires a
+         writable '/var/lib'.
+
 if NETWORKMANAGER
 
 config NETWORKMANAGER_STARTSCRIPT
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to