mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-24 03:01:01 +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
|
||||
}
|
||||
|
||||
validate_netconf() {
|
||||
validate_netconf_create() {
|
||||
if [ -n "${bastille_network_loopback}" ] && [ -n "${bastille_network_shared}" ]; then
|
||||
error_exit "Invalid network configuration."
|
||||
fi
|
||||
@@ -966,18 +966,18 @@ if [ -z "${EMPTY_JAIL}" ]; then
|
||||
## check if interface is valid
|
||||
if [ -n "${INTERFACE}" ]; then
|
||||
validate_netif
|
||||
validate_netconf
|
||||
validate_netconf_create
|
||||
elif [ -n "${VNET_JAIL}" ]; then
|
||||
if [ -z "${INTERFACE}" ]; then
|
||||
if [ -z "${bastille_network_shared}" ]; then
|
||||
# User must specify interface on vnet jails.
|
||||
error_exit "Error: Network interface not defined."
|
||||
else
|
||||
validate_netconf
|
||||
validate_netconf_create
|
||||
fi
|
||||
fi
|
||||
else
|
||||
validate_netconf
|
||||
validate_netconf_create
|
||||
fi
|
||||
else
|
||||
info "Creating empty jail: ${NAME}."
|
||||
@@ -1016,4 +1016,4 @@ if check_target_exists "${NAME}"; then
|
||||
error_exit "Error: Existing jail found: ${NAME}"
|
||||
fi
|
||||
|
||||
create_jail "${NAME}" "${RELEASE}" "${IP}" "${INTERFACE}"
|
||||
create_jail "${NAME}" "${RELEASE}" "${IP}" "${INTERFACE}"
|
||||
|
||||
Reference in New Issue
Block a user