create: Change function (validate_netconf) name to differentiate between other commands

This commit is contained in:
tschettervictor
2025-04-26 11:32:59 -06:00
committed by GitHub
parent 6af5e7c8e0
commit 7225e23af6

View File

@@ -168,7 +168,7 @@ validate_netif() {
fi fi
} }
validate_netconf() { validate_netconf_create() {
if [ -n "${bastille_network_loopback}" ] && [ -n "${bastille_network_shared}" ]; then if [ -n "${bastille_network_loopback}" ] && [ -n "${bastille_network_shared}" ]; then
error_exit "Invalid network configuration." error_exit "Invalid network configuration."
fi fi
@@ -966,18 +966,18 @@ if [ -z "${EMPTY_JAIL}" ]; then
## check if interface is valid ## check if interface is valid
if [ -n "${INTERFACE}" ]; then if [ -n "${INTERFACE}" ]; then
validate_netif validate_netif
validate_netconf validate_netconf_create
elif [ -n "${VNET_JAIL}" ]; then elif [ -n "${VNET_JAIL}" ]; then
if [ -z "${INTERFACE}" ]; then if [ -z "${INTERFACE}" ]; then
if [ -z "${bastille_network_shared}" ]; then if [ -z "${bastille_network_shared}" ]; then
# User must specify interface on vnet jails. # User must specify interface on vnet jails.
error_exit "Error: Network interface not defined." error_exit "Error: Network interface not defined."
else else
validate_netconf validate_netconf_create
fi fi
fi fi
else else
validate_netconf validate_netconf_create
fi fi
else else
info "Creating empty jail: ${NAME}." info "Creating empty jail: ${NAME}."
@@ -1016,4 +1016,4 @@ if check_target_exists "${NAME}"; then
error_exit "Error: Existing jail found: ${NAME}" error_exit "Error: Existing jail found: ${NAME}"
fi fi
create_jail "${NAME}" "${RELEASE}" "${IP}" "${INTERFACE}" create_jail "${NAME}" "${RELEASE}" "${IP}" "${INTERFACE}"