mirror of
https://github.com/hackacad/bastille.git
synced 2026-03-26 02:35:20 +01:00
clone: fix vnet name
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user