?? implement
字號:
.RP.TM 78-1273-5 39199 39199-11.ND October 31, 1978.if \n(TN>0 .FS.if \n(TN>0 * On internship from Department 9444..if \n(TN>0 .FE.TLUucp Implementation Description.AU "MH 2C-572" 3126.ie \n(TN>0 D. A. Nowitz\s-2\u*\d\s+2.el D. A. Nowitz.AB.PPUucp is a series of programs designed to permit communicationbetweenUNIXsystems using either dial-up or hardwired communicationlines.This document gives a detailed implementationdescription of the current (second)implementation of uucp..PPThis document isfor use by an administrator/installer of the system.It is not meant as a user's guide..AE.CS 12 5 15.SHIntroduction.LPUucp is a series of programs designed to permit communication between.UXsystems using either dial-up orhardwired communication lines.It is used for file transfers and remote command execution.The first version of the system was designed and implementedby M. E. Lesk.\s-2\u1\d\s+2.FS1 M. E. Lesk and A. S. Cohen,.UXSoftware Distribution by Communication Link,.ie \n(TN>0 TM-77-1274-3, TM-77-8234-5..el private communication..FEThis paper describes the current (second) implementationof the system..LPUucp is a batch type operation.Files are created in a spool directory for processingby the uucp demons.There are three types of files used for the executionof work..I Data\ filescontain data for transfer to remote systems..I Work\ filescontain directions for file transfers between systems..I Execution\ filesare directions for.UXcommand executions whichinvolve the resources of one or more systems..LPThe uucp system consists of four primary and twosecondary programs.The primary programs are:.RS.IP uucp 10This program creates work and gathers data files in the spool directoryfor the transmission of files..IP uuxThis program creates work files, execute files and gathers data files for the remote execution of.UXcommands..IP uucicoThis program executes the work files for data transmission..IP uuxqtThis program executes the execution files for.UXcommand execution..RE.ne 10.LPThe secondary programs are:.RS.IP uulog 10This program updates the log file with new entriesand reports on the status of uucp requests..IP uucleanThis program removes old files from the spool directory..LP.REThe remainder of this paper will describe the operationof each program, the installation of the system,the security aspects of the system,the files required for execution,and the administration of the system..NHUucp - UNIX to UNIX File Copy.LPThe.I uucpcommand is the user's primary interface with the system.The.I uucpcommand was designed to look like.I cpto the user.The syntax is.IP.I uucp\ \ .B [option.B ]\ ...\ \ source\ ...\ \ destination.LPwhere the source and destinationmay contain the prefix.I system-name!which indicates the system on which the fileor files resideor where they will be copied..LPThe options interpreted by.I uucpare:.RS.IP \-d 10Make directories when necessary for copying the file..IP \-cDon't copy source files to the spool directory,but use the specified source when the actualtransfer takes place..IP \-g\fIletter\fRPut.I letterin as the grade in the name of the work file.(This can be used to change the order of work for a particularmachine.).IP \-mSend mail on completion of the work..LPThe following options are used primarily for debugging:.IP \-r 10Queue the job but do not start.I uucicoprogram..IP \-s\fIdir\fRUse directory.I dirfor the spool directory..IP \-x\fInum\fR.I Numis the level of debugging output desired..RE.LPThe destination may be a directory name,in which case the file name is taken from the last part of thesource's name.The sourcename may contain special shell characterssuch as ``\fI?*[]\fR''.If a source argument has a.I system-name!prefix for a remote system,the file name expansion will be done on the remote system..LPThe command.IP "" 12uucp\ \ *.c\ \ usg!/usr/dan.LPwill set up the transfer of all files whose names end with ``.c''to the ``/usr/dan'' directory on the``usg'' machine..LPThe source and/or destination names may also contain a.I ~userprefix.This translates to the login directory onthe specified system.For names with partial path-names,the current directory is prepended to the file name.File names with.I ../are not permitted..LPThe command.IP "" 12uucp\ \ usg!~dan/*.h\ \ ~dan.LPwill set up the transfer of files whose names end with ``.h''in dan's logindirectory on system ``usg'' to dan's locallogin directory..LPFor each source file,the program will check the source and destinationfile-namesand the system-part of each toclassify the work into one of five types:.RS.IP [1]Copy source to destination on local system..IP [2]Receive files from other systems..IP [3]Send files to a remote systems..IP [4]Send files from remote systemsto another remote system..IP [5]Receive files from remote systems when the sourcecontains special shell characters asmentioned above..RE.LPAfter the work has been set up in the spool directory,the.I uucicoprogram is started to try to contact the othermachine to execute the work (unless the \-r optionwas specified)..SHType 1.LPA.I cpcommand is used to do the work.The.I \-dand the.I \-moptions are not honored in this case..SHType 2.LPA one line.I "work file"is created for each file requested and put in the spool directorywith the following fields, each separated by a blank.(All.I "work files"and.I "execute files"use a blank as the field separator.).RS.IP [1]R.IP [2]The full path-name of the source or a ~user/path-name.The.I ~userpart will be expanded on the remote system..IP [3]The full path-name of the destination file.If the.I ~usernotation is used, it will be immediatelyexpanded to be the login directory for the user..IP [4]The user's login name..IP [5]A ``\-'' followed by an option list.(Only the \-m and \-d options will appear in this list.).RE.KS.SHType 3.LPFor each source file, a.I "work file"is created and the source file is copied into a.I "data file"in the spool directory.(A ``\-c'' option on the.I uucpcommand will prevent the.I "data file"from being made.)In this case, the file will be transmitted fromthe indicated source.)The fields of each entry are given below..RS.IP [1]S.IP [2]The full-path name of the source file..IP [3]The full-path name of the destination or~user/file-name..IP [4]The user's login name..IP [5]A ``\-'' followed by an option list..IP [6]The name of the.I "data file"in the spool directory..IP [7]The file mode bits of the source filein octal print format(e.g. 0666)..RE.KE.SHType 4 and Type 5.LP.I Uucpgenerates a.I uucpcommand and sends it to the remote machine;the remote.I uucicoexecutes the.I uucpcommand..NHUux - UNIX To UNIX Execution.LPThe.I uuxcommand is used to set up the execution of a.UXcommandwhere the execution machine and/or some of thefiles are remote.The syntax of the uux command is.IP.I uux\ \ .B [\-.B "] ["option.B ]\ ...\ \ command-string.LPwhere the command-string is made up of one or more arguments.All special shell characters such as ``<>|^'' must be quotedeither by quoting the entire command-stringor quoting the character as a separate argument.Within the command-string, the command and file names maycontain a.I system-name!prefix.All arguments which do not contain a ``!'' will notbe treated as files.(They will not be copied to the execution machine.)The ``\-'' is used to indicate that the standard inputfor.I command-stringshould be inherited from the standard inputof the.I uuxcommand.The options, essentially for debugging, are:.RS.IP \-r 10Don't start.I uucicoor.I uuxqtafter queuing the job;.IP \-x\fInum\fRNum is the level of debugging output desired..RE.LPThe command.IP "" 12pr\ \ abc\ \ |\ \ uux\ \ \-\ \ usg!lpr.LPwill set up the output of ``pr abc''as standard input to an lpr commandto be executed on system ``usg''..LP.I Uuxgenerates an.I "execute file"which contains thenames of the files requiredfor execution (including standard input),the user's login name, the destinationof the standard output, and the command to be executed.This file is either put in the spool directoryfor local execution or sent to the remote system usinga generated send command (type 3 above)..LPFor required files which are not on the execution machine,.I uuxwill generate receive command files (type 2 above).These command-files will be put on the execution machine andexecuted by the.I uucicoprogram.(This will work only if the local system has permissionto put files in the remote spool directory as controlledby the remote.I USERFILE .).LPThe.I "execute file"will be processedby the.I uuxqtprogram on the execution machine.It is made up of several lines,each of which contains an identification characterand one or more arguments.The order of the lines in the file is not relevantand some of the lines may not be present.Each line is described below..RS.SHUser Line.IPU\ \ user\ \ system.LPwhere the.I userand.I systemare the requester's login name and system..SHRequired File Line.IPF file-name real-name.LPwhere the.I file-nameis the generated name of a file for the execute machineand.I real-nameis the last part of the actual file name (contains nopath information).Zero or more of these lines may be present in the.I "execute file" .The.I uuxqtprogram will check for the existence of all requiredfiles before the command is executed..SHStandard Input Line.IPI\ \ file-name.LPThe standard input is either specified by a ``<'' in thecommand-string or inherited from the standard input of the.I uuxcommand if the ``\-'' option is used.If a standard input is not specified,``/dev/null'' is used..SHStandard Output Line.IPO\ \ file-name\ \ system-name.LPThe standard output is specified by a ``>'' within thecommand-string.If a standard output is not specified,``/dev/null'' is used.(Note \- the use of ``>>'' is not implemented.).SHCommand Line.IPC\ \ command\ \ .B [arguments.B ]\ ....LPThe arguments are those specified in the command-string.The standard input and standard output will not appear on thisline.All.I "required files"will be moved to the execution directory (a subdirectoryof the spool directory)and the.UXcommand is executed using the Shell specified in the.I uucp.hheader file.In addition, a shell ``PATH'' statement is prependedto the command line as specified in the.I uuxqtprogram..LPAfter execution, the standard output is copied or set up to besent to the proper place..RE.NHUucico - Copy In, Copy Out.LPThe.I uucicoprogram will perform the following major functions:.RS.IP -\ \ 3Scan the spool directory for work..IP -\ \ Place a call to a remote system..IP -\ \ Negotiate a line protocol to be used..IP -\ \ Execute all requests from both systems..IP -\ \ Log work requests and work completions..RE.LP.I Uucicomay be started in several ways;.RS.IP a) 5by a system daemon,.IP b)by one of the.Iuucp, uux, uuxqt.Ror.I uucicoprograms,.IP c)directly by the user (this is usually for testing),.IP d)by a remote system.(The uucico program should be specified as the ``shell''field in the ``/etc/passwd'' file for the ``uucp'' logins.).RE.LPWhen started by method a, b or c, the program is considered tobe in.I MASTERmode.In this mode, a connection will be made to a remote system.If started by a remote system (method d),the program is considered to be in.I SLAVEmode..LPThe.I MASTERmode will operate in one of two ways.If no system name is specified(\-s option not specified)the program will scan the spool directory forsystems to call.If a system name is specified, that system will be called,and work will only be done for that system..LPThe.I uucicoprogram is generally started by another program.There are several options used for execution:.RS.IP \-r1 10Start the program in.I MASTERmode.This is used when.I uucicois started by a program or ``cron'' shell..IP \-s\fIsys\fRDo work only for system.I sys.If.I \-sis specified,a call to the specified systemwill be made even if there is no work for system.I sysin the spool directory.This is useful for polling systems which do not havethe hardware to initiate a connection..LPThe following options are used primarily for debugging:.IP \-d\fIdir\fRUse directory.I dirfor the spool directory..IP \-x\fInum\fR.I Numis the level of debugging output desired..RE.LPThe next part of this section will describe the major steps withinthe.I uucicoprogram..SHScan For Work.LPThe names of the work related files in the spool directory have format.IPtype . system-name grade number.LPwhere:.IP
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -