correct location for third party /var files

Matthew Seaman m.seaman at infracaninophile.co.uk
Sun Mar 21 17:25:21 UTC 2010


On 21/03/2010 14:36:52, Thomas-Martin Seck wrote:
> Anyway, I just tried to move cache/log/pidfile to /var and found that
> this seems a bit tricky if not impossible when you generate your
> packagelist dynamically with PLIST_DIRS/PLIST_FILES. It looks like you
> need to wrap your absolute paths (or rather the @dirrm(try) calls in the
> plist) between "@cwd /" and "@cwd %%PREFIX%%".  Does anyone know how to
> achieve this without resorting to a static pkg-plist?  (I'd rather not
> introduce a static pkg-plist file with tons of substitutions for squid-2
> and squid-3.0 because of the configurable list of installed error
> directories but for 3.1 and up this could be doable if there is no other
> solution.  The plan would be to have the cache in /var/squid/cache, logs
> in /var/log/squid and the pidfile in /var/squid/; this is so that the
> squid master process does not need root privileges just to be able to
> write to /var/run.)

Instead of trying to make the pkg plist do difficult things, why not
just include code in your RC script to create whatever working files and
directories you need under /var when squid is started up?

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW


More information about the freebsd-ports mailing list