diff --git a/dnsmasq.service b/dnsmasq.service index 07fa92e..08faf75 100644 --- a/dnsmasq.service +++ b/dnsmasq.service @@ -3,7 +3,9 @@ Description=DNS caching server. After=network.target [Service] -ExecStart=/usr/sbin/dnsmasq -k +ExecStart=/usr/sbin/dnsmasq +Type=forking +PIDFile=/run/dnsmasq.pid [Install] WantedBy=multi-user.target diff --git a/dnsmasq.spec b/dnsmasq.spec index 2fef960..9cfc388 100644 --- a/dnsmasq.spec +++ b/dnsmasq.spec @@ -111,6 +111,7 @@ done #set default user /group in src/config.h sed -i 's|#define CHUSER "nobody"|#define CHUSER "dnsmasq"|' src/config.h sed -i 's|#define CHGRP "dip"|#define CHGRP "dnsmasq"|' src/config.h +sed -i "s|\(#\s*define RUNFILE\) \"/var/run/dnsmasq.pid\"|\1 \"%{_rundir}/dnsmasq.pid\"|" src/config.h # optional parts sed -i 's|^COPTS[[:space:]]*=|\0 -DHAVE_DBUS -DHAVE_LIBIDN2 -DHAVE_DNSSEC|' Makefile @@ -188,6 +189,7 @@ install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf %changelog * Thu Apr 15 2021 Petr Menšík - 2.85-1 - Update to 2.85 (#1978728) +- Switch systemd unit to forking, reports error on startup (#1774028) * Thu Apr 15 2021 Mohan Boddu - 2.84-2 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937