diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-07-03 22:54:34 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-03 11:49:18 -0400 |
commit | 66d3e4a318d4bde968f46daf1dcd7a03e5d0c9d4 (patch) | |
tree | 1e77b41596203771fd62c54c8f0dceb8444bb5ab /pts-core/functions/pts.php | |
parent | 9696ebdf3b352378bcf919b9fdb9728841144228 (diff) | |
download | phoronix-test-suite-upstream-66d3e4a318d4bde968f46daf1dcd7a03e5d0c9d4.tar.gz phoronix-test-suite-upstream-66d3e4a318d4bde968f46daf1dcd7a03e5d0c9d4.tar.xz phoronix-test-suite-upstream-66d3e4a318d4bde968f46daf1dcd7a03e5d0c9d4.zip |
Add operating system detection support
Diffstat (limited to 'pts-core/functions/pts.php')
-rw-r--r-- | pts-core/functions/pts.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pts-core/functions/pts.php b/pts-core/functions/pts.php index b000960..7720f8e 100644 --- a/pts-core/functions/pts.php +++ b/pts-core/functions/pts.php @@ -25,4 +25,24 @@ define("PTS_VERSION", "1.0.5"); define("PTS_CODENAME", "TRONDHEIM"); define("PTS_TYPE", "DESKTOP"); +// Initalize common / needed PTS start-up work +pts_init(); + +function pts_init() +{ + $uname_o = strtolower(trim(shell_exec("uname -o"))); + + if(strpos($uname_o, "linux") !== FALSE) + { + define("OPERATING_SYSTEM", "Linux"); + define("IS_LINUX", "1"); + } + else + { + define("OPERATING_SYSTEM", "Unknown"); + define("IS_UNKNOWN", "1"); + } + +} + ?> |