Framework: add a migration argument

This is for future use, right now it's not supported.
This commit is contained in:
Franco Fichtner
2017-08-10 08:25:07 +02:00
parent cae65bc764
commit 6169d290b8
3 changed files with 12 additions and 6 deletions
+8 -4
View File
@@ -129,14 +129,18 @@ scripts-auto:
done; \
fi
@if [ -d ${.CURDIR}/src/opnsense/mvc/app/models ]; then \
cat ${TEMPLATESDIR}/models >> ${DESTDIR}/+POST_INSTALL; \
for FILE in $$(cd ${.CURDIR}/src/opnsense/service/templates && \
find -s . -mindepth 2 -type d); do \
cat ${TEMPLATESDIR}/models | \
sed "s:%%ARG%%:$${FILE#./}:g" >> \
${DESTDIR}/+POST_INSTALL; \
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 "echo -n \"Reloading template $${FILE#./}: \"" >> \
${DESTDIR}/+POST_INSTALL; \
echo "/usr/local/sbin/configctl template reload $${FILE#./}" >> \
cat ${TEMPLATESDIR}/templates | \
sed "s:%%ARG%%:$${FILE#./}:g" >> \
${DESTDIR}/+POST_INSTALL; \
done; \
fi
+2 -2
View File
@@ -1,2 +1,2 @@
echo "Running migration"
/usr/local/opnsense/mvc/script/run_migrations.php
echo "Migrating %%ARG%%"
/usr/local/opnsense/mvc/script/run_migrations.php %%ARG%%
+2
View File
@@ -0,0 +1,2 @@
echo -n "Reloading template %%ARG%%: "
/usr/local/sbin/configctl template reload %%ARG%%