summaryrefslogtreecommitdiff
path: root/extra/ntp
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-03-01 03:21:19 +0000
committerroot <root@rshg054.dnsready.net>2012-03-01 03:21:19 +0000
commit6f297b1cf462a11227d811a87124006c55911d63 (patch)
tree325073cc18485496bf07d32e56edf643f3b7a2bf /extra/ntp
parent32b05a621cb20af1bd4b7cd6f5609b7512bb20f1 (diff)
Thu Mar 1 03:21:19 UTC 2012
Diffstat (limited to 'extra/ntp')
-rw-r--r--extra/ntp/PKGBUILD12
-rw-r--r--extra/ntp/install15
-rw-r--r--extra/ntp/ntp.conf12
-rw-r--r--extra/ntp/ntpd.conf4
4 files changed, 28 insertions, 15 deletions
diff --git a/extra/ntp/PKGBUILD b/extra/ntp/PKGBUILD
index d928156f3..d1d2e2fb1 100644
--- a/extra/ntp/PKGBUILD
+++ b/extra/ntp/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 150713 2012-02-21 01:06:35Z bisson $
+# $Id: PKGBUILD 151633 2012-02-29 01:32:42Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>
pkgname=ntp
pkgver=4.2.6.p5
_realver=4.2.6p5
-pkgrel=3
+pkgrel=4
pkgdesc='Network Time Protocol reference implementation'
url='http://www.ntp.org/'
license=('custom')
@@ -22,8 +22,8 @@ source=("http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${_realver}.tar.gz"
sha1sums=('4a5353a4791b6f4315a66c28d504ec6c7926b192'
'4e324e625c1f080b5c028be5092aa71adbf9bd99'
'01394b8a952f5edc85d19df8335eeac3980320f4'
- 'f6fa4838a33a3abcdd168a37b3f4a2dddd60472e'
- '6cfcb7bbd34499b30e31dffca2f3e1a036010271'
+ 'c18b0e35068a06500e1556889b54194e3a63a056'
+ '4537d1f58b299d463db5048129cb264511474b0b'
'4f76f7f9ffc8315ff9924f793f272d4f6939b816')
install=install
@@ -34,7 +34,7 @@ build() {
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
- --enable-linux-caps \
+ --enable-linuxcaps \
make
}
@@ -45,7 +45,7 @@ package() {
make DESTDIR="${pkgdir}" install
rmdir "${pkgdir}"/usr/{lib,sbin}
- install -d "${pkgdir}"/var/lib/ntp
+ install -d -o 87 "${pkgdir}"/var/lib/ntp
install -Dm755 ../ntpd "${pkgdir}"/etc/rc.d/ntpd
install -Dm755 ../ntpdate "${pkgdir}"/etc/rc.d/ntpdate
install -Dm644 ../ntp.conf "${pkgdir}"/etc/ntp.conf
diff --git a/extra/ntp/install b/extra/ntp/install
index 926b4126e..7581ec12f 100644
--- a/extra/ntp/install
+++ b/extra/ntp/install
@@ -1,3 +1,9 @@
+post_install() {
+ getent group ntp &>/dev/null || groupadd -g 87 ntp >/dev/null
+ getent passwd ntp &>/dev/null || useradd -u 87 -g ntp -d /var/lib/ntp -c 'Network Time Protocol' -s /bin/false ntp >/dev/null
+ true
+}
+
post_upgrade() {
if [[ $(vercmp $2 4.2.6.p3) -le 0 ]]; then
cat <<EOF
@@ -16,4 +22,13 @@ EOF
EOF
fi
+ if [[ $(vercmp $2 4.2.6.p5-3) -le 0 ]]; then
+ post_install
+ fi
+}
+
+post_remove() {
+ getent passwd ntp &>/dev/null && userdel ntp >/dev/null
+ getent group ntp &>/dev/null && groupdel ntp >/dev/null
+ true
}
diff --git a/extra/ntp/ntp.conf b/extra/ntp/ntp.conf
index 49b2f2bb7..0d548ac1e 100644
--- a/extra/ntp/ntp.conf
+++ b/extra/ntp/ntp.conf
@@ -5,15 +5,13 @@
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
-# Select three geolocalized NTP public servers; see http://www.pool.ntp.org/
-server 0.pool.ntp.org
-server 1.pool.ntp.org
-server 2.pool.ntp.org
+# Associate to public NTP pool servers; see http://www.pool.ntp.org/
+pool pool.ntp.org
# Only allow read-only access from localhost
-restrict default nomodify nopeer
-restrict 127.0.0.1
-restrict ::1
+restrict default noquery nopeer
+restrict 127.0.0.1 noserve nomodify
+restrict ::1 noserve nomodify
# Location of drift and log files
driftfile /var/lib/ntp/ntp.drift
diff --git a/extra/ntp/ntpd.conf b/extra/ntp/ntpd.conf
index e728db579..047961fde 100644
--- a/extra/ntp/ntpd.conf
+++ b/extra/ntp/ntpd.conf
@@ -1,5 +1,5 @@
# client options for "ntpd -q" - ntpdate equivalent
-NTP_CLIENT_OPTION="-g"
+NTP_CLIENT_OPTION="-g -u ntp"
# arguments passed to ntpd when started
-NTPD_ARGS="-g"
+NTPD_ARGS="-g -u ntp"