This ancient perl4 script (download here) automates the maintenance of sun automount(8) configurations.
Current status: I wrote that?
Last update: 1992
Status as of last update: worked fine
NAME autoautomount - automatically configures the automounter SYNOPSIS autoautomount [ -autoupdate ] [ -silent ] [ -flush [ hostname... ] ] [ ----------- ------- ------ -------- -favor ] [ -unfavor ] ------ -------- DESCRIPTION autoautomount will generate and maintain automount(8) configuration files. It will also maintain the fstab. autoautomount assumes that you want all of the exported filesystems of computer x mounted at /x. - -- This is fundemental to autoautomount so if it does not fit your requirements, do not use autoautomount! autoautomount is designed to be used in a network that includes both Sun and Apollo workstations. There are two primary ways to use autoautomount: the first is to use it to install automount; the second is to maintain your automount configu- ration. Whenever autoautomount is run, it generates shell scripts for both installing and maintaining your automount configuration files. These scripts are named auto.install, and auto.update respectively. ------------ ----------- Although it is not always required, it is usually a good idea to run auto.install in single-user mode because it has to be able unmount ------------ filesystems with impunity. To make sure that auto.install is examined ------------ before it is run, autoautomount does not turn on execute permission for auto.install. ------------ Invoked without any options, autoautomount will just create a few files for you to look at. There is no risk in running autoautomount in an empty directory. The basic activity of autoautomount is to run a showmount -e on each host listed in the /etc/hosts file and build an automount mount map using the information returned. Because apollo computers do not work very well, autoautomount treats them specially. It soft-mounts them instead of hard mounting them. It also will make links so that you can access ones that are not NFS servers through ones that are. OPTIONS In its normal mode of operation, autoautomount is somewhat verbose; it reports each host as it processes it. This verbosity can be supressed with the -silent option. One common way to use autoautomount is to run it from cron(8) once a week. The -autoupdate option will cause the auto.update script to be run automatically. If combined with the -silent option, there will not be any output if everything works. Because an important system might not be up during a particular run of autoautomount, the output from showmount(8) is cached in /etc/auto.mas- ter. If you wish to flush the cached output, you can invoke autoauto- mount with the -flush option. If you also specify some hosts, it will only flush the information on the hosts specified. Normally, autoautomount makes links in the root level for each host and unique filesystem. Links are only make for hosts and filesystems that receive consideration. By default, everything receives consideration. The -unfavor option reverses the default. The -favor option restores it. FSTAB DIRECTIVES Directives can be placed as comments in your fstab(5) file to control the action of the autoautomount. Each directive must begin at the start of a line with the following magic cookie: # auto DIRECTIVE host/filesystem ... --------- --------------- --- The following directives are recognized: ignore specifices that a host or filesystem should be ignored by the autoautomounter. It will not be removed from the fstab (if present), and it will not be put into the automout configura- tion files. remount specifies that a host should have its fstab entries rewritten so that it mounts everything. autoautomout always mounts other hosts at the root level. unfavor specifies that a host or filesystem should not be considered when making top level links. favor specifies that a host or filesystem should be considered when making top level links. By default, all hosts and filesys- tems are considered for links, but if the favor option is used, and neither the -favor or -unfavor command line argu- ments are used, then only those hosts and filesystems that are explicitly favored get consideration. include specifies another file with directives for autoautomount. Unlink /etc/fstab, the magic cookie is not required in addi- tional files. HOSTS DIRECTIVES As autoautomount processes the /etc/hosts file, it looks for a couple of magic cookies in the comments. If it finds the comment, no nfs, on the same line as a system, then it will skip that system (very similar to the ignore directive in /etc/hosts). If it finds the string, apollo, in the comment field, then if it cannot get a showmount -e to report anything, it will make the assumption that the corresponding system is running Domain OS, and add in a link to it through another apollo system. ENVIRONMENT No enviroment variables are used. FILES /etc/fstab /etc/hosts /etc/rc.local /etc/auto.master automount master map. /etc/auto.hard indirect map of hard mounts. /etc/auto.soft indirect map of soft mounts (apollo). auto.install generated installation script. auto.update generated update script. auto.fstab new /etc/fstab file. auto.master new /etc/auto.master file. auto.hard new /etc/auto.hard file. auto.soft new /etc/auto.soft file. SEE ALSO automount(8), mount(8), showmount(8), fstab(5), rc(8) BUGS autoautomount is not very flexible. It was built to support a particu- lar environment and its usefulness to anyone else depends on how closely their environment matches ours. A host and a filesystem with the same name might confuse autoautomount. Ignoring or unfavoring one or the other should work around this prob- lem. When unmounting filesystems, autoautomount does not notice if they have filesystems mounted on top of them. This can cause the process to fail. This will not be a problem if you do the unmounting by hand. It is assumed that mount -a is a harmless command. This is usually an acceptable assumption. AUTHOR David Muir SharnoffComdisco System ----- ---- -------- -------------- -------- ------ January 29, 1992 AUTOAUTOMOUNT(8)