You can create a client-specific variable by prefixing a dollar sign ($) to its name. The variable helps you to accommodate different architecture types that are 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 16–3 shows the predefined map variables.
Table 16–3 Predefined Map Variables
Variable |
Meaning |
Derived From |
Example |
---|---|---|---|
Architecture type |
uname -m |
sun4u |
|
Processor type |
uname -p |
sparc |
|
Host name |
uname -n |
dinky |
|
Operating system name |
uname -s |
SunOS |
|
Operating system release |
uname -r |
5.8 |
|
Operating system version (version of the release) |
uname -v |
GENERIC |
You can use variables anywhere in an entry line except as a key. For instance, suppose that you have a file server that exports 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 such as the following:
/usr/local/bin -ro server:/usr/local/bin/$CPU |
Now the same entry for all clients applies to all architectures.
Most applications that are 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.