mirror of
https://github.com/YunoHost/yunohost-ci.git
synced 2024-09-03 20:05:53 +02:00
force remove mac address after restoring snapshot
This commit is contained in:
parent
33a8934c0d
commit
fb03d3edea
2 changed files with 3 additions and 3 deletions
|
@ -30,6 +30,9 @@ start_container () {
|
|||
|
||||
restore_snapshot "$CONTAINER_IMAGE" "$CURRENT_VERSION" "$SNAPSHOT_NAME"
|
||||
|
||||
# Unset the mac address to ensure the copy will get a new one and will be able to get new IP
|
||||
lxc config unset "$CONTAINER_IMAGE" volatile.eth0.hwaddr 2> /dev/null
|
||||
|
||||
lxc start $CONTAINER_IMAGE
|
||||
|
||||
wait_container $CONTAINER_IMAGE
|
||||
|
|
3
utils.sh
3
utils.sh
|
@ -98,9 +98,6 @@ create_snapshot()
|
|||
local ynh_version=$2
|
||||
local snapshot=$3
|
||||
|
||||
# Unset the mac address to ensure the copy will get a new one and will be able to get new IP
|
||||
lxc config unset "$image_to_rebuild" volatile.eth0.hwaddr 2> /dev/null
|
||||
|
||||
# Create snapshot
|
||||
lxc snapshot "$instance_to_publish" "$ynh_version-$snapshot" --reuse
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue