Check/update bastille config parameters on runtime
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
======================
|
======================
|
||||||
Version Description
|
Version Description
|
||||||
|
|
||||||
|
1.2.23......Check/update bastille config parameters on runtime.
|
||||||
1.2.22......Make sure minor changes are always applied.
|
1.2.22......Make sure minor changes are always applied.
|
||||||
1.2.21......Check/update bastille config parameters on runtime.
|
1.2.21......Check/update bastille config parameters on runtime.
|
||||||
1.2.20......Allow install in zroot platform with optional zfs dataset.
|
1.2.20......Allow install in zroot platform with optional zfs dataset.
|
||||||
|
|||||||
@@ -1442,12 +1442,16 @@ update_config()
|
|||||||
# Check/append network parameters.
|
# Check/append network parameters.
|
||||||
if ! grep -qw 'bastille_network_vnet_type=' ${INSTALLPATH}/${BASTILLECONF}; then
|
if ! grep -qw 'bastille_network_vnet_type=' ${INSTALLPATH}/${BASTILLECONF}; then
|
||||||
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_vnet_type="if_bridge"
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_vnet_type="if_bridge"
|
||||||
|
elif ! sysrc -f ${INSTALLPATH}/${BASTILLECONF} -n bastille_network_vnet_type | grep -q 'if_bridge'; then
|
||||||
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_vnet_type="if_bridge"
|
||||||
fi
|
fi
|
||||||
if ! grep -qw 'bastille_network_loopback=' ${INSTALLPATH}/${BASTILLECONF}; then
|
if ! grep -qw 'bastille_network_loopback=' ${INSTALLPATH}/${BASTILLECONF}; then
|
||||||
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_loopback=""
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_loopback=""
|
||||||
fi
|
fi
|
||||||
if ! grep -qw 'bastille_network_pf_ext_if=' ${INSTALLPATH}/${BASTILLECONF}; then
|
if ! grep -qw 'bastille_network_pf_ext_if=' ${INSTALLPATH}/${BASTILLECONF}; then
|
||||||
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_pf_ext_if="ext_if"
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_pf_ext_if="ext_if"
|
||||||
|
elif ! sysrc -f ${INSTALLPATH}/${BASTILLECONF} -n bastille_network_pf_ext_if | grep -q 'ext_if'; then
|
||||||
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_pf_ext_if="ext_if"
|
||||||
fi
|
fi
|
||||||
if ! grep -qw 'bastille_network_pf_table=' ${INSTALLPATH}/${BASTILLECONF}; then
|
if ! grep -qw 'bastille_network_pf_table=' ${INSTALLPATH}/${BASTILLECONF}; then
|
||||||
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_pf_table="jails"
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_network_pf_table="jails"
|
||||||
|
|||||||
Reference in New Issue
Block a user