From 33a8934c0dc04bc7bf29feff2278ee3f751d3595 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 22 May 2023 12:42:37 +0200 Subject: [PATCH] remove mac address each time we create a new snapshot --- utils.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils.sh b/utils.sh index 90e602e..298e26e 100755 --- a/utils.sh +++ b/utils.sh @@ -98,6 +98,9 @@ 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 } @@ -206,9 +209,6 @@ rebuild_base_containers() chmod 777 $current_dir/cache lxc config device add "$image_to_rebuild" cache-folder disk path=/cache source="$current_dir/cache" - # 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 - create_snapshot "$image_to_rebuild" "$ynh_version" "before-install" # Install YunoHost