Skip to content

Instantly share code, notes, and snippets.



Last active Aug 12, 2019
What would you like to do?
Hook for nullfs mounting an extra patches directory in the master jail
# /usr/local/etc/poudriere.d/hooks/
# NOTE: mount is invoked before start: re
if [ "$status" = "mount" ]; then
# The local-patches directory is created only if it does not already exist.
# If it does not already exist, it means we are doing this on the master jail
if [ ! -d "${mntpath}/local-patches" ]; then
/bin/mkdir "${mntpath}/local-patches"
# mount our patches to that location
/sbin/mount -t nullfs /usr/local/etc/poudriere.d/local-patches "${mntpath}/local-patches"
exit 0
The hook can be used on conjunction with an entry in
/usr/local/etc/poudriere.d/make.conf (or similar) such as this
.if ${.CURDIR:M*/net-mgmt/nagios}
EXTRA_PATCHES+= /local-patches/webserver/nagios.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment