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