From 5b89d29070eeff66f00133777ed1aa3d8ef2f97a Mon Sep 17 00:00:00 2001 From: mxi1 Date: Fri, 12 Jun 2009 03:20:05 +0000 Subject: [PATCH] -use ['SERVER_SOFTWARE'] as the trick git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3558 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-web/lib/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-web/lib/functions.php b/xCAT-web/lib/functions.php index 3843f7e05..3f06126e7 100644 --- a/xCAT-web/lib/functions.php +++ b/xCAT-web/lib/functions.php @@ -873,11 +873,12 @@ function getGroups() { //----------------------------------------------------------------------------- // Returns true if we are running on AIX -function isAIX() { if(exec("oslevel")) {return TRUE;}else {return FALSE;} } //todo: implement +// use dirty trick +function isAIX() { if($_SERVER["SERVER_SOFTWARE"] == "IBM_HTTP_Server") {return TRUE;}else {return FALSE;} } //todo: update to one elegant way later //----------------------------------------------------------------------------- // Returns true if we are running on Linux -function isLinux() { if(exec("uname") == "Linux") {return TRUE;} else {return FALSE;} } //todo: implement +function isLinux() { if(strstr($_SERVER["SERVER_SOFTWARE"], "Apache")==FALSE) {return FALSE;} else {return TRUE;} } //todo: update to one elegant way later //----------------------------------------------------------------------------- // Returns true if we are running on Windows