mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-21 16:32:59 +02:00
oci: Add detection for Oracle Cloud
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
4576ca4cc7
commit
7c24a0d973
@@ -15,6 +15,8 @@ case "${1}" in
|
||||
scriptname="/etc/rc.d/helper/azure-setup"
|
||||
elif running_on_gcp; then
|
||||
scriptname="/etc/rc.d/helper/gcp-setup"
|
||||
elif running_on_oci; then
|
||||
scriptname="/etc/rc.d/helper/oci-setup"
|
||||
else
|
||||
# This system is not running in the cloud
|
||||
exit 0
|
||||
|
||||
@@ -834,4 +834,15 @@ running_on_gcp() {
|
||||
return 1
|
||||
}
|
||||
|
||||
running_on_oci() {
|
||||
if [ -r "/sys/devices/virtual/dmi/id/chassis_asset_tag" ]; then
|
||||
local asset_tag="$(</sys/devices/virtual/dmi/id/chassis_asset_tag)"
|
||||
|
||||
[ "${asset_tag}" = "OracleCloud.com" ] && return 0
|
||||
fi
|
||||
|
||||
# We are not running on OCI
|
||||
return 1
|
||||
}
|
||||
|
||||
# End $rc_base/init.d/functions
|
||||
|
||||
Reference in New Issue
Block a user