Browse code

Adding ntp sysconfig file

Change-Id: Icb36c59af60d448301cef2503f3d2678ae3b07a8
Reviewed-on: http://photon-jenkins.eng.vmware.com/800
Reviewed-by: Priyesh Padmavilasom <ppadmavilasom@vmware.com>
Tested-by: jenkins-photon <wangnan2015@hotmail.com>

dthaluru authored on 2016/05/04 04:05:53
Showing 2 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Network Time Protocol reference implementation
2 2
 Name:		ntp
3 3
 Version:	4.2.8p6
4
-Release:	2%{?dist}
4
+Release:	3%{?dist}
5 5
 License:	NTP
6 6
 URL:		http://www.ntp.org/
7 7
 Group:		System Environment/NetworkingPrograms
... ...
@@ -13,7 +13,7 @@ Source0:	http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/%{name}-%{version}.tar.gz
13 13
 #https://github.com/darkhelmet/ntpstat
14 14
 Source1: ntpstat-master.zip
15 15
 %define sha1 ntpstat=729cf2c9f10da43554f26875e91e1973d4498761
16
-
16
+Source2: ntp.sysconfig
17 17
 BuildRequires:	which
18 18
 BuildRequires:	libcap-devel
19 19
 BuildRequires:	unzip
... ...
@@ -58,6 +58,8 @@ install -v -m755	-d %{buildroot}%{_datadir}/doc/%{name}-%{version}
58 58
 cp -v -R html/*		%{buildroot}%{_datadir}/doc/%{name}-%{version}/
59 59
 install -vdm 755 %{buildroot}/etc
60 60
 
61
+mkdir -p %{buildroot}/etc/sysconfig
62
+cp %{SOURCE2} %{buildroot}/etc/sysconfig/ntp
61 63
 pushd ntpstat-master
62 64
 install -m 755 ntpstat %{buildroot}/%{_bindir}
63 65
 install -m 644 ntpstat.1 %{buildroot}/%{_mandir}/man8/ntpstat.8
... ...
@@ -84,6 +86,7 @@ Conflicts=systemd-timesyncd.service
84 84
 
85 85
 [Service]
86 86
 Type=forking
87
+EnvironmentFile=/etc/sysconfig/ntp
87 88
 ExecStart=/usr/bin/ntpd -g -u ntp:ntp
88 89
 Restart=always
89 90
 
... ...
@@ -114,6 +117,7 @@ rm -rf %{buildroot}/*
114 114
 %files
115 115
 %defattr(-,root,root)
116 116
 %attr(0750, root, root) %config(noreplace) /etc/ntp.conf
117
+%attr(0750, root, root) %config(noreplace) /etc/sysconfig/ntp
117 118
 /lib/systemd/system/ntpd.service
118 119
 %exclude %{_bindir}/ntpstat
119 120
 %exclude %{_mandir}/man8/ntpstat.8*
... ...
@@ -132,6 +136,8 @@ rm -rf %{buildroot}/*
132 132
 %{_mandir}/man8/ntpstat.8*
133 133
 
134 134
 %changelog
135
+*	Thu May 12 2016 Divya Thaluru <dthaluru@vmware.com> 4.2.8p6-3
136
+-	Adding ntp sysconfig file
135 137
 *	Wed May 04 2016 Anish Swaminathan <anishs@vmware.com> 4.2.8p6-2
136 138
 -	Edit scriptlets.
137 139
 *	Thu Jan 21 2016 Anish Swaminathan <anishs@vmware.com> 4.2.8p6-1
138 140
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+# Environment variables required for ntp service