Signed-off-by: Juergen Borleis <[email protected]>
---
projectroot/usr/lib/systemd/system/dnsmasq.service | 2 ++
rules/dnsmasq.in | 9 ++++++---
rules/dnsmasq.make | 5 +++--
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/projectroot/usr/lib/systemd/system/dnsmasq.service
b/projectroot/usr/lib/systemd/system/dnsmasq.service
index c663e018c..2da3a7250 100644
--- a/projectroot/usr/lib/systemd/system/dnsmasq.service
+++ b/projectroot/usr/lib/systemd/system/dnsmasq.service
@@ -6,6 +6,8 @@ ExecStart=/usr/sbin/dnsmasq --pid-file=/run/dnsmasq.pid
ExecReload=/bin/kill -HUP $MAINPID
Type=forking
PIDFile=/run/dnsmasq.pid
+# for the 'dnsmasq.leases' file
+StateDirectory=misc
[Install]
WantedBy=network.target
diff --git a/rules/dnsmasq.in b/rules/dnsmasq.in
index 65f68f738..aec63dd0f 100644
--- a/rules/dnsmasq.in
+++ b/rules/dnsmasq.in
@@ -5,9 +5,9 @@
menuconfig DNSMASQ
tristate
prompt "dnsmasq "
- select DBUS if DNSMASQ_DBUS
- select LUA if DNSMASQ_SCRIPT_LUA
- select ROOTFS_VAR_LIB
+ select DBUS if DNSMASQ_DBUS
+ select LUA if DNSMASQ_SCRIPT_LUA
+ select ROOTFS_VAR_LIB if DNSMASQ_DHCP && RUNTIME
help
A small caching DNS proxy and DHCP server.
@@ -23,6 +23,9 @@ menuconfig DNSMASQ
Note: In order to make dnsmasq work as DHCP, you have to enable
the following kernel features: FIXME
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' for its leases database (DHCP feature enabled).
+
if DNSMASQ
comment "build options ---"
diff --git a/rules/dnsmasq.make b/rules/dnsmasq.make
index 861936329..d9a134cdf 100644
--- a/rules/dnsmasq.make
+++ b/rules/dnsmasq.make
@@ -104,9 +104,10 @@ endif
@$(call install_alternative, dnsmasq, 0, 0, 0644, /etc/dnsmasq.conf)
-# for the 'dnsmasq.leases' file
+ifdef PTXCONF_DNSMASQ_DHCP
+# # for the 'dnsmasq.leases' file
@$(call install_copy, dnsmasq, 0, 0, 0755, /var/lib/misc)
-
+endif
@$(call install_finish, dnsmasq)
@$(call touch)
--
2.20.1
_______________________________________________
ptxdist mailing list
[email protected]