man mkuuwho (Administration système) - make a database suitable for the uuwho command
NAME
mkuuwho - make a database suitable for the uuwho command
SYNOPSIS
/usr/lib/smail/mkuuwho [-v] [-x] [-e] [-n] [ -t trace [ -u uuwho_database ] [ path_config ]
DESCRIPTION
Mkuuwho is a modified version of the mkpath(8) utility, used for creating a database for use by the uuwho(1) command. It reads a mkpath(8) configuration file and builds a DBM database named uuwho_database (by default a database named /etc/smail/uuwho). This database is used by the uuwho command to determine where maps for specific sites or domains can be found. The configuration file is used to determine from which files, and in which order, map data should be used to create this DBM database. This command is currently available only on machines that have the dbm(3X) library functions.
If path_config is -, then a specification will be taken from the standard input. If path_config is omitted, then the default specification /etc/smail/maps/mkpath.conf is used.
CONFIGURATION FILE FORMAT
The format of the path configuration file is a set of lines containing directives. Blank lines are ignored and the character ``#'' begins a comment which continues until the end of the line. The various possible directives are described below.
In these directive descriptions, an argument of arg refers to one of the following types of arguments:
- literal
- Literal data specified inline. (single quotes)
- shell-command
- Take data from the standard output of this shell command. (back quotes)
- filename...
- Take data from the named file or files. Files may be specified using shell globbing notation, with * ? and [].
The shell-command form preserves newlines and whitespace and is thus not entirely equivalent to usage in sh(1). The following lines result in the same input to uuwho:
map `cat food` # ackpft! map food # oop ack!
For the shell-command and literal forms, the filename used for error messages is [stdin].
- map arg
- Specify map data to be given as input to uuwho. Each file is preceded by a line containing:
file { pathname }
where pathname is the full pathname to the file. This allows uuwho to know which from file the data was taken.
- safemap arg
- This is similar to the map directive, and can be used when you do not have sufficient control over what the files contain. If a map file contains pathalias file directives, those directives are ignored.
- delete arg
- adjust arg
- dead arg
- text arg
- file filename
- These mkpath configuration file directives are ignored by mkuuwho.
- cd [dir]
- By default, the current directory used by mkuuwho begins in the directory of the configuration file, or in the current directory if the configuration is read from the standard input. The cd command without a dir argument changes to the directory from which mkuuwho was invoked. A dir arg of - changes the directory to the default directory based on the name of the configuration file. Otherwise, dir becomes the current directory for file and shell command references.
- sh cmd
- The given shell command is executed.
- pathalias [flags]
- pathsort [flags]
- These directives end execution blocks (see the next section), but have no other side effects when processed by mkuuwho.
EXECUTION BLOCKS
Directives are executed in blocks. A map, safemap, delete, adjust, dead or file directive starts a block. Successive directives continue it. A pathalias or pathsort directive ends a block. The end of a file can end a block.
When the start of a block is seen, all directives up to the end of the block are collected and fed into the resulting uuwho(8) command. Directives such as cd or sh within a block only effect that block. Therefore, a cd directive within a block will only change the directory for the remainder of that block, whereas a cd directive outside of a block has a global effect.
Additionally an sh directive will feed its standard output into the block's pathalias command when it is inside a block, while an sh directive outside of a block will send its output direct to the standard output of the mkuuwho command.
OPTIONS
The following options are recognized by mkuuwho:
- -v
- The internal sh(1) commands are executed with a -v option, thus echoing the commands that are piped to the shell prior to their being processed.
- -x
- Pass the -x flag to invocations of the shell, causing commands which are about to execute to be echoed.
- -e
- Pass the -e flag to invocations of the shell, causing shells to exit whenever a command returns a non-zero exit status. In addition, the mkuuwho program will exit when it encounters a syntax error or unknown directive.
- -n
- Disable the execution of any shell commands that mkuuwho generates. This is useful with the -v option and disables the -x, -e and -V options.
- -t trace
- Cause the input to pathalias to be copied into the file trace.
- -u uuwho_database
- Cause the named DBM database to be created, rather than using the default name of /etc/smail/uuwho.
SEE ALSO
BUGS
The first ``#'' character on a line begins a comment regardless of whether or not it is within quotes.
The -e option does not stop all execution, only command execution within an instance of the shell created by mkuuwho.
Continuation lines are not currently allowed in the configuration file. Each command must be on a single line.
COPYRIGHT
Copyright
(C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
Copyright
(C) 1992 Ronald S. Karr
See a file COPYING, distributed with the source code, or type smail -bc, to view distribution rights and restrictions associated with this software.