Re: Get ${OSREL} at install time

From: Felix Palmen <>
Date: Tue, 18 Apr 2023 12:07:25 UTC
* Felix Palmen <> [20230418 13:48]:
> BTW, another thing might be a bit problematic here: Calling
> freebsd-version like this will work when pkg is used with -c (using
> chroot), but most likely not with -r.

Forgot to mention the solution: Call ${PKG_ROOTDIR}/bin/freebsd-version
instead, see pkg-script(5).

And if you want to give lua a try, you probably don't have to worry
about it, see pkg-lua-script(5) ;) (it's handled automatically with
calls to open or execute a file).

 Felix Palmen <>     {private}
 -- ports committer (mentee) --            {web}
 {pgp public key}
 {pgp fingerprint} 6936 13D5 5BBF 4837 B212  3ACC 54AD E006 9879 F231