diff options
author | Sam James <sam@gentoo.org> | 2021-02-08 14:14:24 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-02-08 14:54:02 +0000 |
commit | 010d17c7b421a0fa06ecd2430913f04ea5f47562 (patch) | |
tree | 1f4a54ff4709bdca63121703980aae9d0a2d5fc8 /net-misc/chrony | |
parent | net-misc/chrony: add note re changes on USE=seccomp install (diff) | |
download | gentoo-010d17c7b421a0fa06ecd2430913f04ea5f47562.tar.gz gentoo-010d17c7b421a0fa06ecd2430913f04ea5f47562.tar.bz2 gentoo-010d17c7b421a0fa06ecd2430913f04ea5f47562.zip |
net-misc/chrony: add notice when switching USE=caps -> USE=-caps
Closes: https://bugs.gentoo.org/740550
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/chrony')
-rw-r--r-- | net-misc/chrony/chrony-4.0-r1.ebuild | 12 | ||||
-rw-r--r-- | net-misc/chrony/chrony-9999.ebuild | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/net-misc/chrony/chrony-4.0-r1.ebuild b/net-misc/chrony/chrony-4.0-r1.ebuild index d663e9cb680e..4a9997a20a5d 100644 --- a/net-misc/chrony/chrony-4.0-r1.ebuild +++ b/net-misc/chrony/chrony-4.0-r1.ebuild @@ -188,10 +188,14 @@ pkg_preinst() { pkg_postinst() { tmpfiles_process chronyd.conf - if [[ -n ${REPLACING_VERSIONS} ]] && use caps && ! ${HAD_CAPS}; then - ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp" - ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony" - ewarn "This is necessary for chrony to drop privileges" + if [[ -n "${REPLACING_VERSIONS}" ]] ; then + if use caps && ! ${HAD_CAPS} ; then + ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp" + ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony" + ewarn "This is necessary for chrony to drop privileges" + elif ! use caps && ! ${HAD_CAPS} ; then + ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by root:root" + fi fi if [[ ! ${HAD_SECCOMP} ]] && use seccomp ; then diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild index d663e9cb680e..4a9997a20a5d 100644 --- a/net-misc/chrony/chrony-9999.ebuild +++ b/net-misc/chrony/chrony-9999.ebuild @@ -188,10 +188,14 @@ pkg_preinst() { pkg_postinst() { tmpfiles_process chronyd.conf - if [[ -n ${REPLACING_VERSIONS} ]] && use caps && ! ${HAD_CAPS}; then - ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp" - ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony" - ewarn "This is necessary for chrony to drop privileges" + if [[ -n "${REPLACING_VERSIONS}" ]] ; then + if use caps && ! ${HAD_CAPS} ; then + ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp" + ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony" + ewarn "This is necessary for chrony to drop privileges" + elif ! use caps && ! ${HAD_CAPS} ; then + ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by root:root" + fi fi if [[ ! ${HAD_SECCOMP} ]] && use seccomp ; then |