mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-05 20:24:09 +01:00
network: Use epair list to find next epair
This commit is contained in:
@@ -239,7 +239,7 @@ add_interface() {
|
||||
if [ "${BRIDGE}" -eq 1 ]; then
|
||||
if [ "${_epair_count}" -gt 0 ]; then
|
||||
for _num in $(seq 0 "${_epair_num_range}"); do
|
||||
if ! echo "${_epair_list}" | grep -osq "${_num}" && ! grep -Eosq "(bastille${_num}|epair${_num})" ${bastille_jailsdir}/*/jail.conf && ! ifconfig -g epair | grep -Eosq "(e${_num}a|epair${_num}a|bastille${_num})"; then
|
||||
if ! echo "${_epair_list}" | grep -osq "${_num}"; then
|
||||
if [ "$(echo -n "e${_num}a_${jail_name}" | awk '{print length}')" -lt 16 ]; then
|
||||
local host_epair=e${_num}a_${_jailname}
|
||||
local jail_epair=e${_num}b_${_jailname}
|
||||
@@ -312,7 +312,7 @@ EOF
|
||||
|
||||
elif [ "${VNET}" -eq 1 ]; then
|
||||
for _num in $(seq 0 "${_epair_num_range}"); do
|
||||
if ! grep -Eq "(bastille${_num}|epair${_num})" "${bastille_jailsdir}"/*/jail.conf; then
|
||||
if ! echo "${_epair_list}" | grep -osq "${_num}"; then
|
||||
local bastille_epair="bastille${_num}"
|
||||
break
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user