firmware: hook plugin install, third time is the charm?

This commit is contained in:
Franco Fichtner 2026-01-15 08:34:20 +01:00
parent 82af1a69ee
commit a57180946b
2 changed files with 10 additions and 1 deletions

View file

@ -7,6 +7,9 @@ require_once('util.inc');
require_once('system.inc');
require_once('plugins.inc.d/webgui.inc');
/* XXX hook for the development version only */
pass_safe('/usr/local/etc/rc.syshook.d/upgrade/20-isc-dhcp-plugin.sh devel');
if (count($argv) > 1) {
if (is_numeric($argv[1])) {
/* starting delayed */

View file

@ -23,9 +23,15 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
WHICHONE=os-isc-dhcp
if [ "${1}" == "devel" ]; then
WHICHONE=${WHICHONE}-${1}
fi
if [ ! -f /usr/local/opnsense/version/isc-dhcp ]; then
echo "Installing legacy ISC-DHCP plugin for compatibility..."
/usr/local/opnsense/scripts/firmware/launcher.sh -u install os-isc-dhcp
/usr/local/opnsense/scripts/firmware/launcher.sh -u install ${WHICHONE}
else
echo "Skipping already installed legacy ISC-DHCP plugin..."
fi