Update clone.sh

This commit is contained in:
tschettervictor
2025-04-26 11:30:48 -06:00
committed by GitHub
parent e843f97d3b
commit 1c9f715afa

View File

@@ -136,6 +136,15 @@ validate_ip() {
fi
}
validate_netconf_clone() {
if [ -n "${bastille_network_loopback}" ] && [ -n "${bastille_network_shared}" ]; then
error_exit "Invalid network configuration."
fi
if [ "${bastille_network_vnet_type}" != "if_bridge" ] || [ "${bastille_network_vnet_type}" != "netgraph" ]; then
error_exit "[ERROR]: 'bastille_network_vnet_type' not set properly: ${bastille_network_vnet_type}"
fi
}
update_jailconf() {
# Update jail.conf
JAIL_CONFIG="${bastille_jailsdir}/${NEWNAME}/jail.conf"
@@ -150,6 +159,7 @@ update_jailconf() {
fi
if grep -qw "vnet;" "${JAIL_CONFIG}"; then
validate_netconf
update_jailconf_vnet
else
_ip4="$(bastille config ${TARGET} get ip4.addr | sed 's/,/ /g')"