Templates: make this easier on the eyes

This commit is contained in:
Franco Fichtner 2016-09-23 07:28:09 +02:00
parent b4385511ab
commit 65c75ad1fe
3 changed files with 13 additions and 6 deletions

View file

@ -32,6 +32,9 @@ PLUGIN_DESC!= git rev-list HEAD --max-count=1 | cut -c1-9
PLUGIN_SCRIPTS= +PRE_INSTALL +POST_INSTALL \
+PRE_DEINSTALL +POST_DEINSTALL
PLUGINSDIR= ${.CURDIR}/../..
TEMPLATESDIR= ${PLUGINSDIR}/Templates
# Setting private mode allows plugins not
# to show up in the firmware GUI, and must
# thus be installed during build or console.
@ -103,16 +106,14 @@ scripts-auto:
# XXX ticket #35
@if [ -d ${.CURDIR}/src/opnsense/service/conf/actions.d ]; then \
for SCRIPT in +POST_INSTALL +POST_DEINSTALL; do \
echo 'echo "Restarting configd"' >> ${DESTDIR}/$${SCRIPT}; \
echo 'if /usr/local/etc/rc.d/configd status > /dev/null; then' >> ${DESTDIR}/$${SCRIPT}; \
echo ' /usr/local/etc/rc.d/configd restart' >> ${DESTDIR}/$${SCRIPT}; \
echo 'fi' >> ${DESTDIR}/$${SCRIPT}; \
cat ${TEMPLATESDIR}/actions.d >> \
${DESTDIR}/$${SCRIPT}; \
done; \
fi
@if [ -d ${.CURDIR}/src/etc/rc.loader.d ]; then \
for SCRIPT in +POST_INSTALL +POST_DEINSTALL; do \
echo 'echo "Reloading firmware configuration"' >> ${DESTDIR}/$${SCRIPT}; \
echo '/usr/local/etc/rc.configure_firmware' >> ${DESTDIR}/$${SCRIPT}; \
cat ${TEMPLATESDIR}/rc.loader.d >> \
${DESTDIR}/$${SCRIPT}; \
done; \
fi

4
Templates/actions.d Normal file
View file

@ -0,0 +1,4 @@
echo "Restarting configd"
if /usr/local/etc/rc.d/configd status > /dev/null; then
/usr/local/etc/rc.d/configd restart
fi

2
Templates/rc.loader.d Normal file
View file

@ -0,0 +1,2 @@
echo "Reloading firmware configuration"
/usr/local/etc/rc.configure_firmware