Date: Thu, 18 Aug 2016 21:22:30 -0600 From: Adam Weinberger <adamw@adamw.org> To: Cy Schubert <Cy.Schubert@komquats.com> Cc: Cy Schubert <cy@FreeBSD.org>, ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r420435 - in head/sysutils: cfengine33 cfengine34 cfengine35 cfengine36 cfengine37 cfengine38 cfengine39 Message-ID: <65B513A9-A5FA-402D-AD70-2960CE6C6C2C@adamw.org> In-Reply-To: <201608190120.u7J1KIcF090022@slippy.cwsent.com> References: <201608190120.u7J1KIcF090022@slippy.cwsent.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 18 Aug, 2016, at 19:20, Cy Schubert <Cy.Schubert@komquats.com> = wrote: >=20 > In message <E1569D9B-9C86-4707-ABC7-E0080DD5B59F@adamw.org>, Adam=20 > Weinberger wr > ites: >>> On 18 Aug, 2016, at 18:37, Cy Schubert <cy@FreeBSD.org> wrote: >>>=20 >>> Author: cy >>> Date: Fri Aug 19 00:37:47 2016 >>> New Revision: 420435 >>> URL: https://svnweb.freebsd.org/changeset/ports/420435 >>>=20 >>> Log: >>> Update @unexec with modern @postunexec. >>>=20 >>> Modified: head/sysutils/cfengine33/pkg-plist >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= >> =3D=3D=3D >>> --- head/sysutils/cfengine33/pkg-plist Thu Aug 18 23:28:59 2016 >> (r420434) >>> +++ head/sysutils/cfengine33/pkg-plist Fri Aug 19 00:37:47 2016 >> (r420435) >>>=20 >>> -@unexec rmdir "/var/cfengine/inputs" >/dev/null 2>&1 || : >>> +@postunexec rmdir "/var/cfengine/inputs" >/dev/null 2>&1 || : >>=20 >> Why not just plain old >> @dir /var/cfengine/inputs >> @dir will happily ignore non-empty directories. >>=20 >> And combining with your next commit, you can just >> @dir(root,wheel,700) /var/cfengine/ppkeys >=20 > Does that not delete the directory upon package deletion? If = upgrading,=20 > you're left with no keys, no data. >=20 > I suppose though, this could work because the directories would have = data=20 > and would not be deleted, except for a nasty message to the user. = Either=20 > way, it's a hack. AFAIK, @dir should never remove anything except empty directories. The only difference I'm aware of between @dir and the previous = @postunexec is the >/dev/null, and the ability to set mode/ownership and = declare the dir at the same time. # Adam --=20 Adam Weinberger adamw@adamw.org http://www.adamw.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?65B513A9-A5FA-402D-AD70-2960CE6C6C2C>