diff options
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild (renamed from net-analyzer/arpwatch/arpwatch-2.1.15-r10.ebuild) | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/net-analyzer/arpwatch/arpwatch-2.1.15-r10.ebuild b/net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild index 986da0386f7d..758ebf7b0548 100644 --- a/net-analyzer/arpwatch/arpwatch-2.1.15-r10.ebuild +++ b/net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -61,9 +61,26 @@ src_install () { doins duplicates.awk euppertolower.awk p.awk e.awk d.awk diropts --group=arpwatch --mode=770 - dodir /var/lib/arpwatch + keepdir /var/lib/arpwatch dodoc README CHANGES newinitd "${FILESDIR}"/arpwatch.initd-r1 arpwatch newconfd "${FILESDIR}"/arpwatch.confd-r1 arpwatch } + +pkg_postinst() { + # Previous revisions installed /var/lib/arpwatch with the wrong + # ownership. Instead of the intended arpwatch:root, it was left as + # root:root. If we find any such mis-owned directories, we fix them, + # and then set the permission bits how we want them in *this* + # revision. + # + # The "--from" flag ensures that we only fix directories that need + # fixing, and the "&& chmod" ensures that we only adjust the + # permissions if the owner also needed fixing. + chown --from=root:root \ + --no-dereference \ + :arpwatch \ + "${ROOT}"/var/lib/arpwatch && \ + chmod 770 "${ROOT}"/var/lib/arpwatch +} |