# man automount
[...]
Variable Substitution
Client specific variables can be used within an automount
map. For instance, if $HOST appeared within a map, automount
would expand it to its current value for the client's host
name. Supported variables are:
[...]
OSREL The output of uname -rThe OS release name.
For example "5.3"
--
Darren
You can't do that exactly with the bits that it gives you.
If your path had '5.9' in it instead of 'sparc9', you could use the variable in place of '5.9' and it would be expanded.
Instead you could set a variable explicitly in the autofs startup script.
if [ (os is Solaris 8) ] ; then
MYVAR="sparc8"
elif [(os is Solaris 9)] ; then
MYVAR="sparc9"
else
MYVAR="?"
fi
export MYVAR
[... rest of normal autofs script below]
Then you should be able to use the MYVAR in your mount line.
/usr/local $MYVAR:/usr/local
--
Darren