[OmniOS-discuss] What's the best way to detect OmniOS version, specifically r151014?

Dan McDonald danmcd at omniti.com
Wed Dec 2 19:22:37 UTC 2015


> On Dec 2, 2015, at 2:16 PM, Chris Siebenmann <cks at cs.toronto.edu> wrote:
> 
> We have at least one shell script that needs to know if it's running
> on a host with OmniOS r151014 versus a host with an earlier OmniOS
> version (due to the change in ZFS pool reservations from 1/64th of the
> pool to 1/32nd of the pool that we picked up with r151014). Is there
> any particular good way for a shell script to determine this, ideally
> in a lightweight way and without requiring root permissions?
> 
> Thanks in advance.

/etc/release is the stable interface.  We use it ourselves in the omniti-ms gate:

	# Determine what release we're running as that affects some versions of things
	RELEASE=$(head -1 /etc/release | awk '{ print $3 }') 

Hope this helps,
Dan



More information about the OmniOS-discuss mailing list