Next Previous Contents

5. Execution File Format

Execution File Format

UUCP `X.*' files control program execution. They are created by `uux'. They are transferred between systems just like any other file. The `uuxqt' daemon reads them to figure out how to execute the job requested by `uux'.

An `X.*' file is simply a text file. The first character of each line is a command, and the remainder of the line supplies arguments. The following commands are defined:

`C command' This gives the command to execute, including the program and all arguments. For example, `rmail ian@airs.com'.

`U user system' This names the user who requested the command, and the system from which the request came.

`I standard-input' This names the file from which standard input is taken. If no standard input file is given, the standard input will probably be attached to `/dev/null'. If the standard input file is not from the system on which the execution is to occur, it will also appear in an `F' command.

`O standard-output [system]' This names the standard output file. The optional second argument names the system to which the file should be sent. If there is no second argument, the file should be created on the executing system.

`F required-file [filename-to-use]' The `F' command can appear multiple times. Each `F' command names a file which must exist before the execution can proceed. This will usually be a file which is transferred from the system on which `uux' was executed, but it can also be a file from the local system or some other system. If the file is not from the local system, then the command will usually name a file in the spool directory. If the optional second argument appears, then the file should be copied to the execution directory under that name. This is necessary for any file other than the standard input file. If the standard input file is not from the local system, it will appear in both an `F' command and an `I' command.

`R requestor-address' This is the address to which mail about the job should be sent. It is relative to the system named in the `U' command. If the `R' command does not appear, then mail is sent to the user named in the `U' command.

`Z' This command takes no arguments. It means that a mail message should be sent if the command failed. This is the default behaviour for most modern UUCP packages, and for them the `Z' command does not actually do anything.

`N' This command takes no arguments. It means that no mail message should be sent, even if the command failed.

`n' This command takes no arguments. It means that a mail message should be sent if the command succeeded. Normally a message is sent only if the command failed.

`B' This command takes no arguments. It means that the standard input should be returned with any error message. This can be useful in cases where the input would otherwise be lost.

`e' This command takes no arguments. It means that the command should be processed with `/bin/sh'. For some packages this is the default anyhow. Most packages will refuse to execute complex commands or commands containing wildcards, because of the security holes this opens.

`E' This command takes no arguments. It means that the command should be processed with the `execve' system call. For some packages this is the default anyhow.

`M status-file' This command means that instead of mailing a message, the message should be copied to the named file on the system named by the `U' command.

`# comment' This command is ignored, as is any other unrecognized command.

Here is an example. Given the following command executed on system test1 uux - test2!cat - test2! ian/bar !qux '> /gorp' (this is only an example, as most UUCP systems will not permit the cat command to be executed) Taylor UUCP will produce something like the following `X.' file: U ian test1 F D.test1N003r qux O /usr/spool/uucppublic test1 F D.test1N003s I D.test1N003s C cat -  ian/bar qux The standard input will be read into a file and then transferred to the file `D.test1N003s' on system `test2'. The file `qux' will be transferred to `D.test1N003r' on system `test2'. When the command is executed, the latter file will be copied to the execution directory under the name `qux'. Note that since the file ` ian/bar' is already on the execution system, no action need be taken for it. The standard output will be collected in a file, then copied to the directory `/usr/spool/uucppublic' on the system `test1'.


Next Previous Contents