From 13714ffa05d7d8a7ca9f9f61bfa75a3f7e8c2503 Mon Sep 17 00:00:00 2001 From: Scott Little Date: Mon, 2 Oct 2017 17:27:13 -0400 Subject: [PATCH 2/5] WRS: dnsmasq-spec-add-init-script.patch Conflicts: SPECS/dnsmasq.spec --- SPECS/dnsmasq.spec | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/SPECS/dnsmasq.spec b/SPECS/dnsmasq.spec index 63ff820..f8aace1 100644 --- a/SPECS/dnsmasq.spec +++ b/SPECS/dnsmasq.spec @@ -21,6 +21,7 @@ License: GPLv2 or GPLv3 URL: http://www.thekelleys.org.uk/dnsmasq/ Source0: http://www.thekelleys.org.uk/dnsmasq/%{?extrapath}%{name}-%{version}%{?extraversion}.tar.gz Source1: %{name}.service +Source2: init # upstream git: git://thekelleys.org.uk/dnsmasq.git # https://bugzilla.redhat.com/show_bug.cgi?id=1367772 @@ -140,22 +141,26 @@ mkdir -p %{buildroot}%{_unitdir} install -m644 %{SOURCE1} %{buildroot}%{_unitdir} rm -rf %{buildroot}%{_initrddir} +# Systemv +mkdir -p %{buildroot}/etc/init.d +install -m 755 %{SOURCE2} %{buildroot}/etc/init.d/dnsmasq + %clean rm -rf $RPM_BUILD_ROOT -%post -%systemd_post dnsmasq.service +#%post +#%systemd_post dnsmasq.service -%preun -%systemd_preun dnsmasq.service +#%preun +#%systemd_preun dnsmasq.service -%postun -%systemd_postun_with_restart dnsmasq.service +#%postun +#%systemd_postun_with_restart dnsmasq.service -%triggerun -- dnsmasq < 2.52-3 -%{_bindir}/systemd-sysv-convert --save dnsmasq >/dev/null 2>&1 ||: -/sbin/chkconfig --del dnsmasq >/dev/null 2>&1 || : -/bin/systemctl try-restart dnsmasq.service >/dev/null 2>&1 || : +#%triggerun -- dnsmasq < 2.52-3 +#%{_bindir}/systemd-sysv-convert --save dnsmasq >/dev/null 2>&1 ||: +#/sbin/chkconfig --del dnsmasq >/dev/null 2>&1 || : +#/bin/systemctl try-restart dnsmasq.service >/dev/null 2>&1 || : %files %defattr(-,root,root,-) @@ -167,6 +172,7 @@ rm -rf $RPM_BUILD_ROOT %{_unitdir}/%{name}.service %{_sbindir}/dnsmasq %{_mandir}/man8/dnsmasq* +/etc/init.d/dnsmasq %files utils %{_bindir}/dhcp_* -- 1.9.1