You can create a client-specific variable by prefixing a dollar sign ($) to its name. This helps you to accommodate different architecture types accessing the same file system location. You can also use curly braces to delimit the name of the variable from appended letters or digits. Table 5-1 shows the predefined map variables.
Table 5-1 Predefined Map Variables
Variable |
Meaning |
Derived From |
Example |
---|---|---|---|
Architecture type |
uname -m |
sun4 |
|
Processor Type |
uname -p |
sparc |
|
Host name |
uname -n |
dinky |
|
Operating system name |
uname -s |
SunOS |
|
Operating system release |
uname -r |
5.4 |
|
Operating system version (version of the release) |
uname -v |
FCS1.0 |
You can use variables anywhere in an entry line except as a key. For instance, if you have a file server exporting binaries for SPARC and x86 architectures from /usr/local/bin/sparc and /usr/local/bin/x86 respectively, you can have the clients mount through a map entry like the following:
/usr/local/bin -ro server:/usr/local/bin/$CPU |
Now the same entry on all the clients applies for all architectures.
Most applications written for any of the sun4 architectures can run on all sun4 platforms, so the -ARCH variable is hardcoded to sun4 instead of sun4m or sun4c.