Improve interface validation on vnet jail creation
This commit is contained in:
@@ -176,7 +176,7 @@ ${NAME} {
|
|||||||
|
|
||||||
vnet;
|
vnet;
|
||||||
vnet.interface = e0b_${uniq_epair};
|
vnet.interface = e0b_${uniq_epair};
|
||||||
exec.prestart += "jib addm ${uniq_epair} ${INTERFACE}";
|
exec.prestart += "jib addm ${uniq_epair} ${bastille_jail_conf_interface}";
|
||||||
exec.poststop += "jib destroy ${uniq_epair}";
|
exec.poststop += "jib destroy ${uniq_epair}";
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
@@ -543,10 +543,14 @@ if [ -z "${EMPTY_JAIL}" ]; then
|
|||||||
if [ -n "${INTERFACE}" ]; then
|
if [ -n "${INTERFACE}" ]; then
|
||||||
validate_netif
|
validate_netif
|
||||||
validate_netconf
|
validate_netconf
|
||||||
elif [ -z "${INTERFACE}" ]; then
|
elif [ -n "${VNET_JAIL}" ]; then
|
||||||
if [ -n "${VNET_JAIL}" ]; then
|
if [ -z "${INTERFACE}" ]; then
|
||||||
# User must specify interface on vnet jails.
|
if [ -z "${bastille_network_shared}" ]; then
|
||||||
error_exit "Error: Network interface not defined."
|
# User must specify interface on vnet jails.
|
||||||
|
error_exit "Error: Network interface not defined."
|
||||||
|
else
|
||||||
|
validate_netconf
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
validate_netconf
|
validate_netconf
|
||||||
|
|||||||
Reference in New Issue
Block a user