summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2018-02-25 12:18:40 -0500
committerAnthony G. Basile <blueness@gentoo.org>2018-02-25 12:19:01 -0500
commit839ee317aeb7166949a75c17997ada40fca2d74c (patch)
treea30a5dbfc3c9600b01a6a8a37ea6403894a36ecd /net-misc/ntpsec/ntpsec-9999.ebuild
parentapp-misc/vcp: Fix compiling against sys-libs/ncurses[tinfo] (bug #633744). (diff)
downloadgentoo-839ee317aeb7166949a75c17997ada40fca2d74c.tar.gz
gentoo-839ee317aeb7166949a75c17997ada40fca2d74c.tar.bz2
gentoo-839ee317aeb7166949a75c17997ada40fca2d74c.zip
net-misc/ntpsec: improve out-of-box configuration
Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'net-misc/ntpsec/ntpsec-9999.ebuild')
-rw-r--r--net-misc/ntpsec/ntpsec-9999.ebuild24
1 files changed, 14 insertions, 10 deletions
diff --git a/net-misc/ntpsec/ntpsec-9999.ebuild b/net-misc/ntpsec/ntpsec-9999.ebuild
index 8263e59187fd..a565abf1c84d 100644
--- a/net-misc/ntpsec/ntpsec-9999.ebuild
+++ b/net-misc/ntpsec/ntpsec-9999.ebuild
@@ -117,21 +117,25 @@ src_install() {
python_foreach_impl run_in_build_dir python_install
# Install heat generating scripts
- use heat && dosbin "${S}/contrib/ntpheat"{,usb}
+ use heat && dosbin "${S}"/contrib/ntpheat{,usb}
# Install the openrc files
- newinitd "${FILESDIR}/ntpd.rc-r1" "ntp"
- newconfd "${FILESDIR}/ntpd.confd" "ntp"
+ newinitd "${FILESDIR}"/ntpd.rc-r2 ntp
+ newconfd "${FILESDIR}"/ntpd.confd ntp
# Install the systemd unit file
- systemd_newunit "${FILESDIR}/ntpd.service" ntpd.service
+ systemd_newunit "${FILESDIR}"/ntpd.service ntpd.service
+
+ # Prepare a directory for the ntp.drift file
+ mkdir -pv "${ED}"/var/lib/ntp
+ chown ntp:ntp "${ED}"/var/lib/ntp
+ chmod 770 "${ED}"/var/lib/ntp
# Install a log rotate script
- mkdir -pv "${ED}/etc/"logrotate.d
- cp -v "${S}/etc/logrotate-config.ntpd" "${ED}/etc/logrotate.d/ntpd"
+ mkdir -pv "${ED}"/etc/logrotate.d
+ cp -v "${S}"/etc/logrotate-config.ntpd "${ED}"/etc/logrotate.d/ntpd
- # Install the configuration files
- cp -Rv "${S}/etc/ntp.d/" "${ED}/etc/"
- mv -v "${ED}/etc/ntp.d/default.conf" "${ED}/etc/ntp.conf"
- sed "s|includefile |includefile ntp.d/|" -i "${ED}/etc/ntp.conf"
+ # Install the configuration file and sample configuration
+ cp -v "${FILESDIR}"/ntp.conf "${ED}"/etc/ntp.conf
+ cp -Rv "${S}"/etc/ntp.d/ "${ED}"/etc/
}