mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-06 04:34:19 +01:00
create: Change function (validate_netconf) name to differentiate between other commands
This commit is contained in:
@@ -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}"
|
||||||
|
|||||||
Reference in New Issue
Block a user