ntp: fix deps, add cron script to restart ntpd if necessary.

Bump revision.

--HG--
extra : convert_revision : 60243522b1e09709725cf12e8a9d641f712b84b2
This commit is contained in:
Juan RP 2009-10-04 15:03:32 +02:00
parent 8a2333ea81
commit bd95f01f41
2 changed files with 17 additions and 2 deletions

View File

@ -0,0 +1,12 @@
#!/bin/sh
#
# Restarts ntpd if no connected peers are found.
#
ntpq_cmd=/usr/bin/ntpq
ntpd_initd=/etc/init.d/ntpd
if [ ! -x $ntpq_cmd -o ! -x $ntpd_initd ]; then
exit 0
fi
$ntpq_cmd -np | grep '^\*' >/dev/null || (/etc/init.d/ntpd restart)

View File

@ -1,6 +1,7 @@
# Template file for 'ntp' # Template file for 'ntp'
pkgname=ntp pkgname=ntp
version=4.2.4p7 version=4.2.4p7
revision=1
distfiles="http://archive.ntp.org/ntp4/$pkgname-$version.tar.gz" distfiles="http://archive.ntp.org/ntp4/$pkgname-$version.tar.gz"
build_style=gnu_configure build_style=gnu_configure
configure_args="--enable-linuxcaps --enable-getifaddrs=glibc configure_args="--enable-linuxcaps --enable-getifaddrs=glibc
@ -20,19 +21,21 @@ conf_files="/etc/ntp.conf"
openrc_services="ntpd default" openrc_services="ntpd default"
Add_dependency full glibc Add_dependency full glibc
Add_dependency full readline
Add_dependency full openssl Add_dependency full openssl
Add_dependency full libcap Add_dependency full libcap
Add_dependency run ncurses-libs
post_install() post_install()
{ {
install -d ${DESTDIR}/var/chroot/ntpd install -d ${DESTDIR}/var/chroot/ntpd
install -d ${DESTDIR}/etc/init.d ${DESTDIR}/etc/conf.d install -d ${DESTDIR}/etc/init.d ${DESTDIR}/etc/conf.d
install -d ${DESTDIR}/usr/share/ntp install -d ${DESTDIR}/usr/share/ntp ${DESTDIR}/etc/cron.hourly
install -d ${DESTDIR}/usr/share/doc/ntp install -d ${DESTDIR}/usr/share/doc/ntp
install -m 644 ${FILESDIR}/ntpd.confd ${DESTDIR}/etc/conf.d/ntpd install -m 644 ${FILESDIR}/ntpd.confd ${DESTDIR}/etc/conf.d/ntpd
install -m 755 ${FILESDIR}/ntpd.rc ${DESTDIR}/etc/init.d/ntpd install -m 755 ${FILESDIR}/ntpd.rc ${DESTDIR}/etc/init.d/ntpd
install -m 644 ${FILESDIR}/ntp.conf ${DESTDIR}/etc/ntp.conf install -m 644 ${FILESDIR}/ntp.conf ${DESTDIR}/etc/ntp.conf
install -m 744 ${FILESDIR}/ntpd.cron-hourly \
${DESTDIR}/etc/cron.hourly/ntpd_recheck
cp -a ${wrksrc}/html ${DESTDIR}/usr/share/doc/ntp cp -a ${wrksrc}/html ${DESTDIR}/usr/share/doc/ntp
cp -a ${wrksrc}/conf ${DESTDIR}/usr/share/ntp cp -a ${wrksrc}/conf ${DESTDIR}/usr/share/ntp
} }