setmnt reads the standard input and creates a mnttab
entry for each line that it reads.
Input lines have the format:
device node [ option[,option] ... ]
device is the name of the filesystem's special device file. node is the mount point for the filesystem.
You can specify a comma-separated list of generic filesystem options on the command line or on the standard input. The allowed options are those generic options that are recognized by the -o option to mount. An option specified on the command line overrides a conflicting option specified on the standard input. The default options are exec, notrunc, and suid.
If you specify several separate option lists on the command line, setmnt applies each list in turn to the corresponding entry on the standard input. If there are more filesystem entries than option lists, setmnt applies the default generic options (exec, rw, suid, and notrunc) to all remaining filesystems.
If there are conflicting options in an options list, setmnt uses the last option declared.
In the final example, the command line options ro, trunc, noexec, and suid override rw, trunc, exec, and nosuid specified on the standard input.
The next example creates multiple entries in /etc/mnttab:
echo "/dev/u /u
/dev/v /v
/dev/w /w" | /etc/setmnt ro,trunc rw,suid
In this example, setmnt applies options ro, and trunc to /u, rw, and suid to /v, and the default generic options exec, rw, suid, and notrunc to /w.