From 6554c8cf9e8481ed12b224331579ed35da7665a8 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 22 Sep 2016 23:35:24 +0200 Subject: [PATCH] Mk: automate scripting loader.conf --- Mk/plugins.mk | 12 +++++++++++- net/intel-em/+POST_DEINSTALL | 2 -- net/intel-em/+POST_INSTALL | 2 -- sysutils/boot-delay/+POST_DEINSTALL | 2 -- sysutils/boot-delay/+POST_INSTALL | 2 -- 5 files changed, 11 insertions(+), 9 deletions(-) delete mode 100644 net/intel-em/+POST_DEINSTALL delete mode 100644 net/intel-em/+POST_INSTALL delete mode 100644 sysutils/boot-delay/+POST_DEINSTALL delete mode 100644 sysutils/boot-delay/+POST_INSTALL diff --git a/Mk/plugins.mk b/Mk/plugins.mk index 5e6753246..235db3757 100644 --- a/Mk/plugins.mk +++ b/Mk/plugins.mk @@ -90,13 +90,23 @@ manifest: check @echo "}" .endif -scripts: check +scripts: check scripts-manual scripts-auto + +scripts-manual: @for SCRIPT in ${PLUGIN_SCRIPTS}; do \ if [ -f $${SCRIPT} ]; then \ cp $${SCRIPT} ${DESTDIR}/; \ fi; \ done +scripts-auto: + @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}; \ + done; \ + fi + install: check @mkdir -p ${DESTDIR}${LOCALBASE} @(cd ${.CURDIR}/src; find * -type f) | while read FILE; do \ diff --git a/net/intel-em/+POST_DEINSTALL b/net/intel-em/+POST_DEINSTALL deleted file mode 100644 index 4ceb2dca3..000000000 --- a/net/intel-em/+POST_DEINSTALL +++ /dev/null @@ -1,2 +0,0 @@ -echo "Reloading firmware configuration" -/usr/local/etc/rc.configure_firmware diff --git a/net/intel-em/+POST_INSTALL b/net/intel-em/+POST_INSTALL deleted file mode 100644 index 4ceb2dca3..000000000 --- a/net/intel-em/+POST_INSTALL +++ /dev/null @@ -1,2 +0,0 @@ -echo "Reloading firmware configuration" -/usr/local/etc/rc.configure_firmware diff --git a/sysutils/boot-delay/+POST_DEINSTALL b/sysutils/boot-delay/+POST_DEINSTALL deleted file mode 100644 index 4ceb2dca3..000000000 --- a/sysutils/boot-delay/+POST_DEINSTALL +++ /dev/null @@ -1,2 +0,0 @@ -echo "Reloading firmware configuration" -/usr/local/etc/rc.configure_firmware diff --git a/sysutils/boot-delay/+POST_INSTALL b/sysutils/boot-delay/+POST_INSTALL deleted file mode 100644 index 4ceb2dca3..000000000 --- a/sysutils/boot-delay/+POST_INSTALL +++ /dev/null @@ -1,2 +0,0 @@ -echo "Reloading firmware configuration" -/usr/local/etc/rc.configure_firmware