Code consistency updates

This commit is contained in:
JRGTH
2023-05-02 02:18:20 -04:00
parent f1b66e2314
commit f4340545ec
3 changed files with 36 additions and 35 deletions
+1
View File
@@ -3,6 +3,7 @@
====================== ======================
Version Description Version Description
1.1.27......Code consistency updates.
1.1.26......Re-add latest required system files. 1.1.26......Re-add latest required system files.
1.1.25......Minor cosmetic changes. 1.1.25......Minor cosmetic changes.
1.1.24......Minor cosmetic/wording changes. 1.1.24......Minor cosmetic/wording changes.
Executable → Regular
+34 -34
View File
@@ -1199,63 +1199,63 @@ update_config()
# Update config based on minimum version. # Update config based on minimum version.
# Network parameters. # Network parameters.
if grep -qw 'bastille_jail_loopback=' ${BASTILLECONF}; then if grep -qw 'bastille_jail_loopback=' ${INSTALLPATH}/${BASTILLECONF}; then
sed -i '' 's/bastille_jail_loopback=/bastille_network_loopback=/' ${BASTILLECONF} sed -i '' 's/bastille_jail_loopback=/bastille_network_loopback=/' ${INSTALLPATH}/${BASTILLECONF}
fi fi
if grep -qw 'bastille_jail_external=' ${BASTILLECONF}; then if grep -qw 'bastille_jail_external=' ${INSTALLPATH}/${BASTILLECONF}; then
sed -i '' 's/bastille_jail_external=/bastille_network_shared=/' ${BASTILLECONF} sed -i '' 's/bastille_jail_external=/bastille_network_shared=/' ${INSTALLPATH}/${BASTILLECONF}
fi fi
if grep -qw 'bastille_jail_gateway=' ${BASTILLECONF}; then if grep -qw 'bastille_jail_gateway=' ${INSTALLPATH}/${BASTILLECONF}; then
sed -i '' 's/bastille_jail_gateway=/bastille_network_gateway=/' ${BASTILLECONF} sed -i '' 's/bastille_jail_gateway=/bastille_network_gateway=/' ${INSTALLPATH}/${BASTILLECONF}
fi fi
if ! grep -q 'bastille_url_freebsd=' ${BASTILLECONF}; then if ! grep -qw 'bastille_url_freebsd=' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} bastille_url_freebsd="${URL_FREEBSD}" sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_url_freebsd="${URL_FREEBSD}"
fi fi
if ! grep -q 'bastille_url_hardenedbsd=' ${BASTILLECONF}; then if ! grep -qw 'bastille_url_hardenedbsd=' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} bastille_url_hardenedbsd="${URL_HARDENEDBSD}" sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_url_hardenedbsd="${URL_HARDENEDBSD}"
fi fi
if ! grep -q 'bastille_url_midnightbsd=' ${BASTILLECONF}; then if ! grep -qw 'bastille_url_midnightbsd=' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} bastille_url_midnightbsd="${URL_MIDNIGHTBSD}" sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_url_midnightbsd="${URL_MIDNIGHTBSD}"
fi fi
if ! grep -qw 'bastille_network_pf_ext_if=' ${BASTILLECONF}; then if ! grep -qw 'bastille_network_pf_ext_if=' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} bastille_network_pf_ext_if="ext_if" sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_pf_ext_if="ext_if"
fi fi
if ! grep -qw 'bastille_network_pf_table=' ${BASTILLECONF}; then if ! grep -qw 'bastille_network_pf_table=' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} bastille_network_pf_table="jails" sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_pf_table="jails"
fi fi
if ! grep -qw 'bastille_network_gateway6=' ${BASTILLECONF}; then if ! grep -qw 'bastille_network_gateway6=' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} bastille_network_gateway6="" sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_gateway6=""
fi fi
# Template parameters. # Template parameters.
if ! grep -qw 'bastille_template_base=' ${BASTILLECONF}; then if ! grep -qw 'bastille_template_base=' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} bastille_template_base="default/base" sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_template_base="default/base"
fi fi
if ! grep -qw 'bastille_template_empty=' ${BASTILLECONF}; then if ! grep -qw 'bastille_template_empty=' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} bastille_template_empty="" sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_template_empty=""
fi fi
if ! grep -qw 'bastille_template_thick=' ${BASTILLECONF}; then if ! grep -qw 'bastille_template_thick=' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} bastille_template_thick="default/thick" sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_template_thick="default/thick"
fi fi
if ! grep -qw 'bastille_template_thin=' ${BASTILLECONF}; then if ! grep -qw 'bastille_template_thin=' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} bastille_template_thin="default/thin" sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_template_thin="default/thin"
fi fi
if ! grep -qw 'bastille_template_vnet=' ${BASTILLECONF}; then if ! grep -qw 'bastille_template_vnet=' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} bastille_template_vnet="default/vnet" sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_template_vnet="default/vnet"
fi fi
# Remove deprecated parameters based on minimum version. # Remove deprecated parameters based on minimum version.
if grep -qw 'bastille_jail_interface' ${BASTILLECONF}; then if grep -qw 'bastille_jail_interface' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} -x bastille_jail_interface sysrc -f ${INSTALLPATH}/${BASTILLECONF} -x bastille_jail_interface
fi fi
if grep -qw 'bastille_jail_addr' ${BASTILLECONF}; then if grep -qw 'bastille_jail_addr' ${INSTALLPATH}/${BASTILLECONF}; then
sysrc -f ${BASTILLECONF} -x bastille_jail_addr sysrc -f ${INSTALLPATH}/${BASTILLECONF} -x bastille_jail_addr
fi fi
# Update the bootstrap urls accordingly. # Update the bootstrap urls accordingly.
if ! sysrc -f ${BASTILLECONF} -n bastille_url_hardenedbsd | grep -q "${URL_HARDENEDBSD}"; then if ! sysrc -f ${INSTALLPATH}/${BASTILLECONF} -n bastille_url_hardenedbsd | grep -qw "${URL_HARDENEDBSD}"; then
sysrc -f ${BASTILLECONF} bastille_url_hardenedbsd="${URL_HARDENEDBSD}" sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_url_hardenedbsd="${URL_HARDENEDBSD}"
fi fi
} }
+1 -1
View File
@@ -1 +1 @@
1.1.26 1.1.27