clone: fix vnet name

This commit is contained in:
tschettervictor
2025-11-03 00:17:00 -05:00
committed by GitHub
parent c00875e436
commit 32c41d4bac

View File

@@ -263,9 +263,9 @@ update_jailconf_vnet() {
else
if [ -z "${reuse_new_suffix}" ]; then
get_bastille_epair_count
local epair_num=1
while echo "${BASTILLE_EPAIR_LIST}" | grep -oq "bastille${epair_num}"; do
epair_num=$((epair_num + 1))
local bastille_epair_num=1
while echo "${BASTILLE_EPAIR_LIST}" | grep -oq "bastille${bastille_epair_num}"; do
bastille_epair_num=$((bastille_epair_num + 1))
done
local new_host_epair="e${epair_num}a_bastille${bastille_epair_num}"
local new_jail_epair="e${epair_num}b_bastille${bastille_epair_num}"
@@ -420,6 +420,7 @@ update_jailconf_vnet() {
# Update /etc/rc.conf
sed -i '' "s|ifconfig_${old_ngif}_name|ifconfig_${new_ngif}_name|" "${jail_rc_config}"
# IP4
if [ -n "${IP4_ADDR}" ]; then
if grep "vnet0" "${jail_rc_config}" | grep -q "${new_ngif}_name"; then