ASD(8) ASD(8) NAME asd - automatic software distribution SYNOPSIS /usr/lib/asd/cdaemon /usr/lib/asd/dkinstall /usr/lib/asd/mkspool /usr/lib/asd/rmlocks /usr/lib/asd/udaemon DESCRIPTION These programs constitute the innards of the automatic soft- ware distribution system invoked by ship(8). Mkspool creates an ASD spool directory for its invoker (if necessary), puts a file named in the directory to prevent cdaemon from deleting it, and prints the directory's name. Udaemon examines its invoker's ASD spool directory in lexi- cal order for things to do. To forestall multiple daemons, it first makes an empty file named L.pid in the spool direc- tory and tries to link to it a file If the link fails, L.pid is removed and udaemon exits. Shipping instructions appear in pairs of files with .s and .d suffixes. Udaemon examines each status (.s) file for destination names and places a network call to send the cor- responding data (.d) file to dkinstall at each destination. Dkinstall verifies the data and gives it to inspkg, see mkpkg(8). A status file contains zero or more entries, each of which has one or more lines. The first line of an entry is a net- work address, with default network dk and default service asd, possibly followed by a blank and a failure report. An entry with destination `#' is a comment and is ignored. Lines after the first begin with a tab, and contain output generated by the entry. If an entry has output, it is con- sidered complete and will be processed no further. Udaemon scans each status file once, and attempts to send the corresponding data file to the destination for each incomplete entry. If the attempt fails, a failure report is appended to the entry, and it remains incomplete. If the attempt succeeds, or the failure is severe, an error message or output from dkinstall is appended to the entry, which makes the entry complete. If an entry is completed success- fully but there are no output lines, the entry is deleted. Each instance of udaemon remembers which network addresses ASD(8) ASD(8) failed with non-severe errors; entries with the same address in later status files are given failure status `deferred for sequence.' If at least one additional entry was completed, udaemon sends the new status file to the owner by mail(1) after the whole file has been scanned. If no incomplete entries remain, both status and data files are removed. Cdaemon examines every subdirectory of deletes empty direc- tories and, impersonating the owner, invokes udaemon for nonempty directories. Cdaemon should be run regularly by cron(8) with super-user permissions. Rmlocks removes all lock files in subdirectories of It should be called from rc(8). Entries in an ASD spool directory may be made without regard to locks provided that everything is done in the right sequence: (1) call mkspool; (2) create the data file; (3) create the status file under a temporary name; (4) rename the status file to end with .s; (5) remove the file, if pre- sent; and (6) call udaemon. Because mail will not send an empty file, a status file must have a comment entry if acknowledgment is desired after a successful udaemon run. FILES /usr/spool/asd/userid user's ASD spool directory SEE ALSO mkpkg(8), ship(8)