SYSLOAD(1) HP-UX 5.0 SYSLOAD(1) NAME sysload - copy HP-UX disc files SYNOPSIS sysload [ -vfns ] [ control-file ] DESCRIPTION Sysload copies a floppy disc set (typically to a hard disc). Loading is done according to the instructions in control- file. If control-file is not specified, 'sysdest' in the current directory is used. The options are: -v Cause sysload to be more verbose. -f Overwrite old files without write permission. Modes are changed to 0600 for directories, and 0755 for files. -n Echo lines in the control file upon execution. -s Read instructions from standard in. control-file Use a control file other than sysdest. The control file contains lines that instruct the operation of sysload. Two types of lines may exist: text records and comment lines. Each text record begins with a single character which indicates the operation to be performed. Following this character, one or more fields contain the absolute path names to be used in the operation. And lastly, each text record contains a termination character to indicate what happens if the instruction fails. Allowable record types are: D - create a directory or verify that a directory is writable F - copy a file L - link a file to another name M - rename a file R - remove a file E - test for the existence of one or more files or directories N - test for non-existence of one or more files or directories C - change the modes of a file or directory P - print the text record up to the terminator Q - print a query message and wait for a yes/no response Requirements for each type of record are explained below: D The "D" record requires one or more directory names. The named directories will be created if they do not exist. If the named directories exist, then the modes are checked to determine if write permission is allowed. F The "F" records require a source file name and one or more destination directory names. The source file name is separated from the destination(s) by a dash "-". Alternate destinations directories are delimited by a vertical bar separated from the names by white space. The alternate names are tried in turn from left to right. L "L" may have alternate source and destination names. M "M" records cause a file to be renamed. Alternate source names are allowed, but the destination must be a simple file name. The new name will be created in the first directory in which a source file was found. C "C" records may take on one or more directory or file names, also separated by vertical bars. The end of the alternate sources is marked by a dash, followed by the desired mode. The mode is represented in numeric form. Octal, hex, or decimal forms are allowed, and as usual, octal numbers begin with a leading zero, and hex numbers begin with a leading "0x". E N "E" and "N" records allow files or directories to be separated by ampersands ("&") as well as vertical bars "|". Files or directories separated by "&" must all exist (non-exist) for success. Ampersand takes precedence over vertical bar, so "E /aaa & /bbb | /ccc & /ddd !" will test for the existence of both /aaa and /bbb or, failing that, it will test for the existence of both /ccc and /ddd. All records are terminated by one of "!?$". Those records ending in a "!" will give an error if none of the alternatives can be used. Loading will stop if a record ending with "!" fails. ? Those records ending in a "?" will report a failure, but will continue. $ Those records ending in a "$" will never report a failure. * Lines whose first non-white character is a "*" are comments. Also, comments may follow the terminator on any line. + If a "+" precedes the terminator, the next line will be skipped if the current line succeeds. The "+" may also be followed by a count of lines to skip. Comment lines are not counted in the skip process. P "P" commands interpret the terminator slightly differently (since a print cannot fail). Those lines terminated by a "!" will print and take an error exit from the program; those terminated by a "?" will print and continue. Those terminated by a "$" will print if the verbose option was given on the command line, then continue with the next command. Q "Q" commands interpret the terminator differently as well. Queries are done by printing the line from just after the command up to the "+" (if present) or the terminator, immediately followed with a question mark. A line is then read from standard-in, and checked for a positive response. (A positive response is defined as "yes", "ye" or "y", case disregarded). If a positive response is received, the skip specified will be taken. If the terminator was a "!", a negative response is considered a fatal error. If the terminator was a "?", a positive response will cause a message of the form "skipping the next n lines", where n is the skip count, to be printed to stderr. The "$" terminator behaves similarly to the "?" terminator, except the message is printed only if in verbose mode (command line option). Some example records: D /bin | /usr/bin ! * try to copy over a prototype /etc/passwd * but just tell the user if it can't be done. D /etc + 2 ? P /etc/passwd could not be created ? E / + 2 ! note: will always be skip P created /etc/passwd, you must add yourself ? F /disc/etc/passwd - /etc/passwd ! * * now do some links, moves and removes. L /lib/libx.a | /usr/lib/libx.a - /lib/libX.a | /usr/lib/libX.a ! M /lib/fort | /usr/lib/fort - f1 ! Q Should I remove /usr/bin/crypt + $ E / + 1 ! R /usr/bin/crypt $ BUGS Files owned by /root that do not have write permission cannot be overwritten, and will cause sysload to abort.