/tcb/bin/cps [ absolute_pathnames ]
Like fixmog, cps is used to correct problems in the TCB. However, cps checks specified files rather than all files in the File Control database. cps is used primarily by the crash recovery script to ensure files critical to the TCB exist and have the correct owner, group and access permissions specified in the File Control database.
cps accepts absolute pathnames of directories and files to be created. Absolute pathnames are complete pathnames (for example /tcb/bin/cps) as opposed to relative pathnames (for example ../file). An entry (containing a mode) for each component of each pathname must be present in the File Control database, otherwise a fatal error is returned.
cps converts the pathnames supplied to canonical pathnames, that is. ones that don't contain consecutive ``/''s, and none of the directories are ``.'' or ``..''. This enables pathnames to be looked up in the File Control database where pathnames should also be in this format.
Each missing element of each path is created as specified in the File Control database. Elements of each path that already exist, but have incorrect owner, group or access permissions, are changed so they agree with their File Control database entries.
If no parameters are supplied, the pathnames are read from the standard input, which should contain absolute pathnames separated by newlines.
Only the super user can use the fixmog and cps commands.
cps returns an exit status of 1 if a fatal error was detected; otherwise 0 is returned if no changes were required and 2 if any changes to the file system were made. Errors cause appropriate error messages to be displayed.