I have the need to check logically if a computer's operating system is Solaris. In other words I need a way to check if the operating system is Solaris, if so return TRUE
, if not return FALSE
. I can easily check if an OS is Windows, Mac, Linux because I have access to these systems what type
(e.g., "unix", "windows") to search for as this info is commonly google-able. Something along the lines of:
.Platform$OS.type == "unix"
.Platform$OS.type == "windows"
works and there are other approaches well documented on SO (e.g., Sys.info()["sysname"] == "Windows"
). In my search of SO and Google I was led to many questions regarding Windows, Mac, Linux but no way to specifically to determine if the OS is Solaris. For instance this link, which leads to other similar questions it duplicates, addresses determining the OS but not a logical check if Solaris.
How can I programmatically determine if a computer's OS is Solaris?
I may need to be more specific about what forms os Solaris I'm interested in (I'm not sure because I know very little about the OS). Of particular interest are the Solaris systems used in CRAN checks:
- r-patched-solaris-x86
- r-patched-solaris-sparc