Would change the hand-rolled Yes-no check to "checkyesno" from rc.subr(8)?
Also /usr/local in files/checkrestart.in should be changed to %%PREFIX%%.
Whoops, could have sworn I changed it to %%PREFIX%% before submission.
It's a periodic(8) script, so sourcing rc.subr and using checkyesno seems inappropriate - literally no other periodic script, neither in base nor ports, does so. The case statement is the de-facto standard way to do it.
If there's to be something like this it should probably go in /etc/defaults/periodic.conf alongside check_yesno_period.
Created attachment 212982 [details]
Patch to 0.5.0_1
Use %%PREFIX%% in checkrestart.in and bump PORTREVISION in case a user has modified LOCALBASE.
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/132283479
(In reply to Thomas Hurst from comment #1)
Tom, I think you're right.
Could you please change the script to use check_yesno_periodic similarly as it is done in security/base-audit?
Thanks for your understanding.
Created attachment 213047 [details]
Alternate patch to 0.5.0_1 with security periodic script
This patch switches to check_yesno_period - and since doing so only makes sense in the context of a security periodic(8) script, that has been changed as well, along with an upgrade message notifying users of the change.
A commit references this bug:
Date: Sat Apr 4 11:58:04 UTC 2020
New revision: 530648
sysutils/checkrestart: improve rc script
* Use %%PREFIX%% in checkrestart.in
* Use check_yesno_period instead of handmade solution
Submitted by: firstname.lastname@example.org (maintainer)
Reported by: 0mp@
Thank you very much.