edfed46f4f
Story: 2003389 Task: 24494 Change-Id: Ib2bf11d1d797f81c988c4bee598657f32e65f6d5 Signed-off-by: chenyan <yan.chen@intel.com>
70 lines
2.0 KiB
Diff
70 lines
2.0 KiB
Diff
From 13714ffa05d7d8a7ca9f9f61bfa75a3f7e8c2503 Mon Sep 17 00:00:00 2001
|
|
From: Scott Little <scott.little@windriver.com>
|
|
Date: Mon, 2 Oct 2017 17:27:13 -0400
|
|
Subject: [PATCH 2/5] WRS: dnsmasq-spec-add-init-script.patch
|
|
|
|
---
|
|
SPECS/dnsmasq.spec | 26 ++++++++++++++++----------
|
|
1 file changed, 16 insertions(+), 10 deletions(-)
|
|
|
|
diff --git a/SPECS/dnsmasq.spec b/SPECS/dnsmasq.spec
|
|
index 7f370d1..0641503 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
|
|
@@ -168,22 +169,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,-)
|
|
@@ -195,6 +200,7 @@ rm -rf $RPM_BUILD_ROOT
|
|
%{_unitdir}/%{name}.service
|
|
%{_sbindir}/dnsmasq
|
|
%{_mandir}/man8/dnsmasq*
|
|
+/etc/init.d/dnsmasq
|
|
|
|
%files utils
|
|
%{_bindir}/dhcp_*
|
|
--
|
|
2.7.4
|
|
|