From 32c41d4bac833a9186624bb87579c5fa4325459f Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Mon, 3 Nov 2025 00:17:00 -0500 Subject: [PATCH] clone: fix vnet name --- usr/local/share/bastille/clone.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr/local/share/bastille/clone.sh b/usr/local/share/bastille/clone.sh index 9a170cda..52b61308 100644 --- a/usr/local/share/bastille/clone.sh +++ b/usr/local/share/bastille/clone.sh @@ -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