ntp: use ntpd system account for daemon; add ntpdate service, convert html to man.
This commit is contained in:
parent
f38cec55a6
commit
c6de191bac
|
@ -1,8 +1,12 @@
|
|||
[Unit]
|
||||
Description=Network Time Service
|
||||
After=network.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/ntpd -ng
|
||||
PrivateTmp=true
|
||||
ExecStart=/usr/bin/ntpd -n -g -u ntpd:ntpd
|
||||
ControlGroup=cpu:/
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=One-Shot Network Time Service
|
||||
After=network.target nss-lookup.target
|
||||
Before=ntpd.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
PrivateTmp=true
|
||||
ExecStart=/usr/bin/ntpd -q -g -u ntpd:ntpd
|
||||
ControlGroup=cpu:/
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,9 +1,10 @@
|
|||
# Template file for 'ntp'
|
||||
pkgname=ntp
|
||||
version=4.2.6p5
|
||||
revision=7
|
||||
revision=8
|
||||
build_style=gnu-configure
|
||||
configure_args="--enable-linuxcap"
|
||||
hostmakedepends="perl-HTML-Parser"
|
||||
makedepends="readline-devel openssl-devel libcap-devel"
|
||||
short_desc="The Network Time Protocol daemon and utilities"
|
||||
license="BSD"
|
||||
|
@ -12,22 +13,25 @@ homepage="http://www.ntp.org/"
|
|||
distfiles="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-$version.tar.gz"
|
||||
checksum=d6ab8371f9d31e594eb6922823d5ccd03dcc4e9d84b0e23ea25ac1405432f91c
|
||||
|
||||
subpackages="$pkgname-perl"
|
||||
subpackages="ntp-perl"
|
||||
conf_files="/etc/ntp.conf"
|
||||
systemd_services="ntpd.service on"
|
||||
systemd_services="ntpdate.service on ntpd.service on"
|
||||
system_accounts="ntpd"
|
||||
provides="ntp-daemon-0"
|
||||
replaces="ntp-daemon>=0"
|
||||
|
||||
post_install() {
|
||||
# ntpd service
|
||||
vinstall ${FILESDIR}/ntpd.service 644 usr/lib/systemd/system
|
||||
vinstall ${FILESDIR}/ntp.conf 644 etc
|
||||
|
||||
vmkdir usr/share/ntp
|
||||
vmkdir usr/share/doc/ntp
|
||||
vcopy html usr/share/doc/ntp
|
||||
vcopy conf usr/share/ntp
|
||||
|
||||
# ntpdate service
|
||||
vinstall ${FILESDIR}/ntpdate.service 644 usr/lib/systemd/system
|
||||
# For systemd-timedated.
|
||||
vmkdir usr/lib/systemd/ntp-units.d
|
||||
echo "ntpd.service" > ${DESTDIR}/usr/lib/systemd/ntp-units.d/60-ntp.list
|
||||
# Convert html to manual pages.
|
||||
cd html
|
||||
../scripts/html2man
|
||||
vmkdir usr/share/man
|
||||
mv man/man* ${DESTDIR}/usr/share/man
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue