mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-21 17:52:01 +01:00
vnet: start VNET jails at 1 because bastille0 is used as a loopback
This commit is contained in:
@@ -230,8 +230,8 @@ generate_vnet_jail_netblock() {
|
||||
## determine number of interfaces + 1
|
||||
## iterate num and grep all jail configs
|
||||
## define uniq_epair
|
||||
local _epair_if_count="$(grep -Eos 'epair[0-9]+' ${bastille_jailsdir}/*/jail.conf | sort -u | wc -l | awk '{print $1}')"
|
||||
local _vnet_if_count="$(grep -Eos 'bastille[0-9]+' ${bastille_jailsdir}/*/jail.conf | sort -u | wc -l | awk '{print $1}')"
|
||||
local _epair_if_count="$(grep -Eos 'epair[1-9]+' ${bastille_jailsdir}/*/jail.conf | sort -u | wc -l | awk '{print $1}')"
|
||||
local _vnet_if_count="$(grep -Eos 'bastille[1-9]+' ${bastille_jailsdir}/*/jail.conf | sort -u | wc -l | awk '{print $1}')"
|
||||
local epair_num_range=$((_epair_if_count + 1))
|
||||
local vnet_num_range=$((_vnet_if_count + 1))
|
||||
if [ -n "${use_unique_bridge}" ]; then
|
||||
@@ -243,7 +243,7 @@ generate_vnet_jail_netblock() {
|
||||
fi
|
||||
done
|
||||
else
|
||||
local uniq_epair_bridge="0"
|
||||
local uniq_epair_bridge="1"
|
||||
fi
|
||||
else
|
||||
if [ "${_vnet_if_count}" -gt 0 ]; then
|
||||
@@ -254,7 +254,7 @@ generate_vnet_jail_netblock() {
|
||||
fi
|
||||
done
|
||||
else
|
||||
local uniq_epair="bastille0"
|
||||
local uniq_epair="bastille1"
|
||||
fi
|
||||
fi
|
||||
## If BRIDGE is enabled, generate bridge config, else generate VNET config
|
||||
|
||||
Reference in New Issue
Block a user