SUMMARY: Using $OSREL variable in Autofs map entry for the host to mount from

From: David Lim (lim@telerobotics.jpl.nasa.gov)
Date: Mon Jul 18 1994 - 17:34:48 CDT


[I apologize for the mangled subject line of my last post, this is a repost
with the correct subject line. The body of the post remains the same].

Thanks to:

earle@elroy.jpl.nasa.gov (Greg Earle)
dd@mv.us.adobe.com (David DiGiacomo)
sgcccdc@citecub.citec.qld.gov.au (Colin Campbell)

The only variable you can use to distinguish 4.1.3 machines from
5.3 machines is the OSREL variable in NIS+. OSREL returns the output of "uname
-r". e.g. "4.1.3" for 4.1.3 machines, and "5.3" for Solaris 2.3 machines. You
can not use this variable for the hostname since it contains `.'

To quote Colin:

   Is not a bug! The `.' is used in a hostname to delimit the pieces of the
   fully qualified domain name. Thus manhost5.foo is host manhost in domain
   foo. That is why you cannot have a `.' in your hostname. It is not a bug.

Greg also points out that 4.1.3 automount does not support these predefined
variable anyway.

It would be really nice if Sun add the extra variables into the 4.1.3
automounter. And if Sun would provide a predefined variable that could resolve
between 4.1.3 hosts and 5.3 hosts AND could be used as the host to mount from
in the automounter maps (i.e. the variable should not contain `.').

So unfortunately I can not solve my problem using OSREL. I will resort to the
several other methods of mounting a specific directory depending on the OS
release. I've come to the conclusion that it is not worth using these
predefined variables in a mixed 4.1.3 and 5.3 environment.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:06 CDT