From e2fc08cfc19b65ab8901aec4ca550aa2ed6fe581 Mon Sep 17 00:00:00 2001 From: Shital Savekar Date: Sun, 21 Dec 2014 17:28:38 +0530 Subject: [PATCH] Add : Detect "Core OS" distro Added code to detect Core OS distribution. --- SetupScripts/DetectLinuxDistro.sh | 7 +++++++ TestLibs/RDFELibs.psm1 | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/SetupScripts/DetectLinuxDistro.sh b/SetupScripts/DetectLinuxDistro.sh index 09c6438..7462b52 100644 --- a/SetupScripts/DetectLinuxDistro.sh +++ b/SetupScripts/DetectLinuxDistro.sh @@ -50,6 +50,13 @@ done else echo "Unknown" fi + elif [ -e /etc/os-release ]; then + tmp=`cat /etc/os-release` + if [[ "$tmp" == *coreos* ]]; then + echo "COREOS" + exitVal=0 + fi + fi return $exitVal } diff --git a/TestLibs/RDFELibs.psm1 b/TestLibs/RDFELibs.psm1 index 4e48a45..c8dbc73 100644 --- a/TestLibs/RDFELibs.psm1 +++ b/TestLibs/RDFELibs.psm1 @@ -107,6 +107,10 @@ Function DetectLinuxDistro($VIP, $SSHport, $testVMUser, $testVMPassword) { $CleanedDistroName = "FEDORA" } + elseif ($DistroName -imatch "COREOS") + { + $CleanedDistroName = "COREOS" + } else { $CleanedDistroName = "UNKNOWN"