ntp: provide a logrotate file, purge stuff for chroot init.

This commit is contained in:
Juan RP 2011-10-06 10:06:16 +02:00
parent 4a125a4a1f
commit 715b8253a7
3 changed files with 23 additions and 15 deletions

View File

@ -3,9 +3,8 @@
#
case "${ACTION}" in
post)
if [ -d var/chroot/ntpd ]; then
rm -rf var/chroot/ntpd
fi
purge)
[ -d var/chroot/ntpd ] && rm -rf var/chroot/ntpd
[ -f var/db/ntpd.drift ] && rm -f var/db/ntpd.drift
;;
esac

View File

@ -0,0 +1,7 @@
/var/log/ntpd.log {
missingok
sharedscripts
postrotate
/etc/init.d/ntpd reload >/dev/null 2>&1 || true
endscript
}

View File

@ -1,6 +1,7 @@
# Template file for 'ntp'
pkgname=ntp
version=4.2.6p4
revision=1
homepage="http://www.ntp.org/"
distfiles="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-$version.tar.gz"
build_style=gnu_configure
@ -31,15 +32,16 @@ Add_dependency build libcap-devel
post_install()
{
install -d ${DESTDIR}/var/chroot/ntpd
install -d ${DESTDIR}/etc/init.d ${DESTDIR}/etc/conf.d
install -d ${DESTDIR}/usr/share/ntp ${DESTDIR}/etc/cron.hourly
install -d ${DESTDIR}/usr/share/doc/ntp
install -m 644 ${FILESDIR}/ntpd.confd ${DESTDIR}/etc/conf.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 744 ${FILESDIR}/ntpd.cron-hourly \
${DESTDIR}/etc/cron.hourly/ntpd_recheck
cp -a ${wrksrc}/html ${DESTDIR}/usr/share/doc/ntp
cp -a ${wrksrc}/conf ${DESTDIR}/usr/share/ntp
vmkdir var/chroot/ntpd
vmkdir usr/share/ntp
vmkdir usr/share/doc/ntp
vinstall ${FILESDIR}/ntpd.confd 644 etc/conf.d ntpd
vinstall ${FILESDIR}/ntpd.rc 755 etc/init.d ntpd
vinstall ${FILESDIR}/ntp.conf 644 etc
vinstall ${FILESDIR}/ntpd.cron-hourly 744 etc/cron.hourly ntpd_recheck
vinstall ${FILESDIR}/ntpd.logrotate 644 etc/logrotate.d ntpd
vcopy html usr/share/doc/ntp
vcopy conf usr/share/ntp
}