From 54982797a59ef3759d147610d4dc54bc1c359b24 Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 1 Feb 2021 18:20:40 -0400 Subject: [PATCH] Add checking for FreeBSD and HardenedBSD on upgrades --- CHANGELOG | 1 + bastille-init | 8 ++++++++ version | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 5725dd2..bbef1ba 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ ====================== Version Description +1.0.80......Add checking for FreeBSD and HardenedBSD on upgrades. 1.0.79......Don't set template for empty jails, include files for 12.2 release. 1.0.78......Fix for proper bastille config update. 1.0.77......Enable 12.2 RELEASE downloads through the GUI. diff --git a/bastille-init b/bastille-init index f24d606..569979d 100755 --- a/bastille-init +++ b/bastille-init @@ -79,6 +79,8 @@ BATSILLE_ALT="https://github.com/JRGTH/${APPNAME}/archive/${BRANCH}.zip" # Alter BASTILE_VERSION="https://raw.githubusercontent.com/BastilleBSD/${APPNAME}/${BRANCH}/usr/local/bin/${APPNAME}" GITURL="https://github.com/JRGTH/xigmanas-${APPNAME}-extension/archive/${BRANCH}.zip" VERFILE="https://raw.githubusercontent.com/JRGTH/xigmanas-${APPNAME}-extension/${BRANCH}/version" +URL_FREEBSD="http://ftp.freebsd.org/pub/FreeBSD/releases/" +URL_HARDENEDBSD="http://installer.hardenedbsd.org/pub/hardenedbsd/" OPT="${1}" # Bastille required @@ -1043,6 +1045,12 @@ update_config() if grep -qw 'bastille_jail_gateway=' ${BASTILLECONF}; then sed -i '' 's/bastille_jail_gateway=/bastille_network_gateway=/' ${BASTILLECONF} fi + if ! grep -q 'bastille_url_freebsd=' ${BASTILLECONF}; then + sysrc -f ${BASTILLECONF} bastille_url_freebsd="${URL_FREEBSD}" + fi + if ! grep -q 'bastille_url_hardenedbsd=' ${BASTILLECONF}; then + sysrc -f ${BASTILLECONF} bastille_url_hardenedbsd="${URL_HARDENEDBSD}" + fi # Template parameters. if ! grep -qw 'bastille_template_base=' ${BASTILLECONF}; then diff --git a/version b/version index ac329bf..a747663 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.0.79 +1.0.80