From 166b199de670f9a3b2251ee4eb49c0ae451ec309 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 14 Jan 2021 09:20:33 +0100 Subject: [PATCH] firmware: deal with *.pkgsave, offload post install bits to rc.syshook PR: https://github.com/opnsense/core/issues/4574 --- +POST_INSTALL | 5 ----- plist | 1 + src/etc/rc.syshook.d/update/10-refresh | 10 ++++++++++ 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100755 src/etc/rc.syshook.d/update/10-refresh diff --git a/+POST_INSTALL b/+POST_INSTALL index a8cb007c0..d5ee43f9c 100644 --- a/+POST_INSTALL +++ b/+POST_INSTALL @@ -33,9 +33,4 @@ rm -f /etc/rc.shutdown.bak /usr/local/etc/rc.d/configd start -/usr/local/etc/rc.configure_firmware - /usr/local/etc/rc.syshook update - -# create a unique timestamp for our asset caching -touch /usr/local/opnsense/www/index.php diff --git a/plist b/plist index 988e36535..aefe2c302 100644 --- a/plist +++ b/plist @@ -141,6 +141,7 @@ /usr/local/etc/rc.syshook.d/stop/80-freebsd /usr/local/etc/rc.syshook.d/stop/90-backup /usr/local/etc/rc.syshook.d/stop/99-config +/usr/local/etc/rc.syshook.d/update/10-refresh /usr/local/etc/ssl/opnsense.cnf /usr/local/etc/strongswan.opnsense.d/README /usr/local/libexec/opnsense-auth diff --git a/src/etc/rc.syshook.d/update/10-refresh b/src/etc/rc.syshook.d/update/10-refresh new file mode 100755 index 000000000..592af9490 --- /dev/null +++ b/src/etc/rc.syshook.d/update/10-refresh @@ -0,0 +1,10 @@ +#!/bin/sh + +# refresh relevant configuration files +/usr/local/etc/rc.configure_firmware + +# create a unique timestamp for our asset caching +touch /usr/local/opnsense/www/index.php + +# remove spurious .pkgsave files pkg may have created +daemon -f find /usr/local -type f -name "*.pkgsave" -delete