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 31-4 shows the predefined map variables.
Table 31-4 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 IA architectures from /usr/local/bin/sparc and /usr/local/bin/x86 respectively, the clients can mount through a map entry like the following:
/usr/local/bin -ro server:/usr/local/bin/$CPU |
Now the same entry for all clients applies to all architectures.
Most applications written for any of the sun4 architectures can run on all sun4 platforms, so the -ARCH variable is hard-coded to sun4 instead of sun4m.