From: Michael Tremer Date: Tue, 5 Aug 2025 09:51:18 +0000 (+0000) Subject: exoscale: Run the cloud initialization process only once X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fexoscale;p=people%2Fms%2Fipfire-2.x.git exoscale: Run the cloud initialization process only once Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/helper/exoscale-setup b/src/initscripts/helper/exoscale-setup index a0475c2bb..c8d5bd412 100644 --- a/src/initscripts/helper/exoscale-setup +++ b/src/initscripts/helper/exoscale-setup @@ -209,6 +209,11 @@ import_exoscale_configuration() { touch /var/ipfire/main/firstsetup_ok fi + # Run this all only once. The Exoscale metadata service does not + # give us a lot of information, so users are quite likely to make + # changes which should not be overwritten. + : > /var/ipfire/main/.cloud-init-done + # All done echo_ok } diff --git a/src/initscripts/system/cloud-init b/src/initscripts/system/cloud-init index 7721b5b8c..8b2ebbb5a 100644 --- a/src/initscripts/system/cloud-init +++ b/src/initscripts/system/cloud-init @@ -24,6 +24,11 @@ case "${1}" in start) + # Do nothing if this process has already been completed + if [ -e "/var/ipfire/main/.cloud-init-done" ]; then + exit 0 + fi + # Check if we are running in the cloud if running_on_ec2; then scriptname="/etc/rc.d/helper/aws-setup"