From 5ae3706d209909231aeee46ddcf28d8a34e9ba08 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 25 Sep 2020 10:37:06 +0000 Subject: [PATCH] cloud-init: Extend to support Exoscale Signed-off-by: Michael Tremer --- src/initscripts/system/cloud-init | 7 +++++++ src/initscripts/system/functions | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/initscripts/system/cloud-init b/src/initscripts/system/cloud-init index d39552b011..0da4e259ac 100644 --- a/src/initscripts/system/cloud-init +++ b/src/initscripts/system/cloud-init @@ -11,6 +11,8 @@ case "${1}" in # Check if we are running in the cloud if running_on_ec2; then scriptname="/etc/rc.d/helper/aws-setup" + elif running_on_exoscale; then + scriptname="/etc/rc.d/helper/exoscale-setup" elif running_on_azure; then scriptname="/etc/rc.d/helper/azure-setup" elif running_on_gcp; then @@ -62,6 +64,11 @@ case "${1}" in echo "This system is running on AWS EC2" exit 0 + # Check Exoscale + elif running_on_exoscale; then + echo "This system is running on Exoscale" + exit 0 + # Check Microsoft elif running_on_azure; then echo "This system is running on Microsoft Azure" diff --git a/src/initscripts/system/functions b/src/initscripts/system/functions index 234b798cf1..71edf500b4 100644 --- a/src/initscripts/system/functions +++ b/src/initscripts/system/functions @@ -827,6 +827,17 @@ running_on_azure() { return 1 } +running_on_exoscale() { + if [ -r "/sys/devices/virtual/dmi/id/sys_vendor" ]; then + local sys_vendor="$(