setmnt(ADM)


setmnt -- establish mounted filesystem table

Syntax

/etc/setmnt [ option[,option] ... ] ...

Description

/sbin/ckroot invokes setmnt to create the mounted filesystem table in the file /etc/mnttab (see mnttab(F)). This table is needed by the mount(ADM) and umount(ADM) commands.

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.

Examples

The following commands are equivalent:

echo "/dev/u /u" | /etc/setmnt ro,trunc,noexec,suid

echo "/dev/u /u ro,trunc,noexec,suid" | /etc/setmnt

echo "/dev/u /u rw,trunc,nosuid" | /etc/setmnt ro,trunc,suid

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.

Limitations

setmnt is not intended for use from the command line.

Files


/etc/mnttab
mounted filesystem table

See also

bcheckrc(ADM), mnttab(F), mount(ADM)

Standards conformance

setmnt is conformant with AT&T SVID Issue 2.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005