automate the template regeneration for provided templates for #46

Unfortunately, we need to reload all subdirs (minus the vendor
directory).  The "*" matcher is not very clever and cannot be
coerced to match sub directories without potentially matching any
directories longer than their name, e.g. "Sample*" vs "Sample2".

Problem is when these are installed and the templates are wrongly
regenerated.  In theory this doesn't have any bad side effects,
but it may be a potential pitfall to avoid now rather than later.
This commit is contained in:
Franco Fichtner
2016-10-26 15:34:46 +02:00
parent 9dddf05c36
commit 633a22ff3a
+7
View File
@@ -124,6 +124,13 @@ scripts-auto:
${DESTDIR}/$${SCRIPT}; \
done; \
fi
@if [ -d ${.CURDIR}/src/opnsense/service/templates ]; then \
for FILE in $$(cd ${.CURDIR}/src/opnsense/service/templates && \
find -s . -mindepth 2 -type d); do \
echo "/usr/local/sbin/configctl template reload $${FILE#./}" >> \
${DESTDIR}/+POST_INSTALL; \
done; \
fi
install: check
@mkdir -p ${DESTDIR}${LOCALBASE}