Mk: auto generate rc.syshook.d scripts; closes #35

This obsoletes the need to manually set package scripts, which
is still possible but fewer mistakes can be made now as the
scripts automatically adapt to the package's changing content.
This commit is contained in:
Franco Fichtner
2016-09-23 07:46:26 +02:00
parent 65c75ad1fe
commit fa74c7ed0f
3 changed files with 9 additions and 4 deletions
+9 -1
View File
@@ -103,7 +103,15 @@ scripts-manual:
done
scripts-auto:
# XXX ticket #35
@if [ -d ${.CURDIR}/src/etc/rc.syshook.d ]; then \
for SYSHOOK in early start; do \
for FILE in $$(cd ${.CURDIR}/src/etc/rc.syshook.d && \
find -s . -type f -name "*.$${SYSHOOK}"); do \
echo ${LOCALBASE}/etc/rc.syshook.d/$${FILE#./} >> \
${DESTDIR}/+POST_INSTALL; \
done; \
done; \
fi
@if [ -d ${.CURDIR}/src/opnsense/service/conf/actions.d ]; then \
for SCRIPT in +POST_INSTALL +POST_DEINSTALL; do \
cat ${TEMPLATESDIR}/actions.d >> \
-2
View File
@@ -1,2 +0,0 @@
/usr/local/etc/rc.syshook.d/50-vmware.early
/usr/local/etc/rc.syshook.d/50-vmware.start
-1
View File
@@ -1 +0,0 @@
/usr/local/etc/rc.syshook.d/50-xen.start