|
|
@ -63,12 +63,13 @@ EOF |
|
|
function get_container_net0 { |
|
|
function get_container_net0 { |
|
|
OLD_VMID=$(pct-lookup $CONTAINER) |
|
|
OLD_VMID=$(pct-lookup $CONTAINER) |
|
|
SYMPA_NET0=$(pct config $OLD_VMID | grep ^net0 | cut -d ' ' -f2) |
|
|
SYMPA_NET0=$(pct config $OLD_VMID | grep ^net0 | cut -d ' ' -f2) |
|
|
|
|
|
|
|
|
|
|
|
echo "SYMPA_NET0=$SYMPA_NET0" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function rename_old_container { |
|
|
function rename_old_container { |
|
|
pct-rename $CONTAINER $CONTAINER.9 |
|
|
pct-rename $CONTAINER $CONTAINER.9 |
|
|
pct set $OLD_VMID --delete net0 |
|
|
pct set $OLD_VMID --delete net0 |
|
|
pct reboot $OLD_VMID |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function create_new_container { |
|
|
function create_new_container { |
|
|
@ -77,6 +78,10 @@ function create_new_container { |
|
|
local net1=$(pct config $vmid | grep ^net0 | cut -d ' ' -f2 | sed 's/name=eth0/name=eth1/') |
|
|
local net1=$(pct config $vmid | grep ^net0 | cut -d ' ' -f2 | sed 's/name=eth0/name=eth1/') |
|
|
pct set $vmid --net0 "$SYMPA_NET0" |
|
|
pct set $vmid --net0 "$SYMPA_NET0" |
|
|
pct set $vmid --net1 "$net1" |
|
|
pct set $vmid --net1 "$net1" |
|
|
|
|
|
|
|
|
|
|
|
echo '------------------------------------' |
|
|
|
|
|
echo "rebooting container $CONTAINER $vmid" |
|
|
|
|
|
echo '------------------------------------' |
|
|
pct reboot $vmid |
|
|
pct reboot $vmid |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -95,7 +100,3 @@ get_container_net0 |
|
|
rename_old_container |
|
|
rename_old_container |
|
|
create_new_container |
|
|
create_new_container |
|
|
import_from_archive |
|
|
import_from_archive |
|
|
|
|
|
|
|
|
# 8. fix external origin |
|
|
|
|
|
# allowed_external_origin * |
|
|
|
|
|
# (https://gitlab.cemea.org/cemeaweb/khazad-dum/-/issues/110) |
|
|
|