HPUX makecdf[1m]






 makecdf(1M)                                                     makecdf(1M)





 NAME
      makecdf - create context-dependent files

 SYNOPSIS
      makecdf [[-d default] [-f source_file]] [[-c context] ... ] file ...

 DESCRIPTION
      makecdf creates a context-dependent file (CDF) for each file passed on
      the command line.  A list of contexts is generated from the -c
      options, or if no contexts are specified, makecdf creates a default
      context list from the cnode names appearing in /etc/clusterconf.  CDF
      elements are created for each name in this context list (except as
      described below).

      If file exists but is neither a CDF nor a directory, it is converted
      to a CDF whose elements are created by duplicating the original
      contents of file (or the contents of the source_file if the -f option
      is used).

      If file exists and is an ordinary directory, the elements are not
      created by duplicating its contents into each CDF element.  Instead,
      the files in the directory are moved into a directory whose name is
      the first context element mentioned on the command line, and empty
      directories are created for the remaining context elements.  If no
      elements are specified (that is, if there are no -c options), the
      first entry in /etc/clusterconf is used as the name.  In order to do
      this, the user must have write permission on file or be the super-
      user.

      If file exists and is already a CDF, either the -d or -f option must
      be used to specify what should be duplicated to create the new CDF
      elements in the context list.

      If file does not exist and there is no -f option, a CDF is created
      with empty contents whose names are those in the specified context
      list.  In this case, CDF elements are created only for those contexts
      explicitly specified by the -c options (that is, /etc/clusterconf is
      not consulted).

      When making a CDF out of a device file, makecdf makes an appropriate
      cnode-specific device file for each element named by cnode name if
      cnode name exists in /etc/clusterconf.  Otherwise, the cnode ID of the
      original device file is copied to the new file.

      Type, ownership, file mode bits, and access control lists of the CDF
      elements match those of file (see acl(5)).  Contents of regular files
      and directories are copied to the new elements (see WARNINGS below).
      Ownership and the access control list of the CDF match those of the
      parent directory of file.





 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992






 makecdf(1M)                                                     makecdf(1M)





      Only the file owner or superuser may convert a file to a CDF.

    Options
      makecdf supports the following options:

           -c context     Create the named CDF element.  Causes
                          file+/context to be created.  More than one -c
                          option can be specified to construct a context
                          list.

           -d default     Duplicate an existing CDF element.  Useful only
                          for adding elements to existing context-dependent
                          files.  The -d option specifies which existing
                          element of the CDF is to be duplicated into a new
                          element.

           -f source_file Duplicate source_file to the elements of the CDF.
                          This option is only effective when file does not
                          exist or is already a CDF.  Ownership and
                          permissions are preserved.  The filename -
                          indicates that the standard input should be copied
                          to the elements, which become regular files with
                          ownership and permissions much like files normally
                          created by the shells.  Note: The WARNING about
                          file types below applies to this option as well as
                          to file arguments.

 RETURN VALUE
      An exit code of 0 is returned if the CDFs are created without error.
      An exit code of 1 is returned in the case of any failure to create a
      CDF.

      Warnings do not result in an exit code of 1, because they are not
      considered catastrophic.

 DIAGNOSTICS
      Errors in system calls are displayed with whatever useful arguments
      are available.

      Warnings are printed if operations cannot be performed as expected,
      although the CDF is still created.  These warnings generally result
      from failure to change owner or change permissions of a file, or from
      inability to clean up the temporary file or fully recover from a
      failure.

      Many messages make sense only when you understand how the program
      works.  In particular, a temporary file is used to hold file while the
      CDF is created.  The temporary file is then renamed, or copied and
      later removed.  Some messages refer to operations attempted on the
      temporary file.




 Hewlett-Packard Company            - 2 -     HP-UX Release 9.0: August 1992






 makecdf(1M)                                                     makecdf(1M)





      Most other messages are self explanatory.

 EXAMPLES
      Turn the file /etc/issue into a CDF with an element for each cluster
      node name in /etc/clusterconf:

              makecdf /etc/issue

      Turn the file /etc/motd into a CDF with the context elements localroot
      and remoteroot:

              makecdf -c localroot -c remoteroot /etc/motd

      Add the context cnode3 to the existing CDF /etc/issue using the
      context element cnode1 as the file to duplicate:

              makecdf -c cnode3 -d cnode1 /etc/issue

      Create a new CDF menu for which there is no existing file, copy the
      contents of menu1 into the element cnode1 and the contents of menu2
      into the element cnode2:

              makecdf -c cnode1 -f menu1 menu
              makecdf -c cnode2 -f menu2 menu

      To move all files currently in ~/bin to ~/bin+/HP-MC68010 while
      creating the empty directory ~/bin+/HP-MC68020, execute the command:

              makecdf -c HP-MC68010 -c HP-MC68020 ~/bin

 WARNINGS
      Note that makecdf attempts to create elements identical in type to
      file; thus, specifying the file /dev/null results in creating special
      file elements rather than creating empty regular files.  The latter
      operation is correctly performed by using the command:

              makecdf -f - file < /dev/null

      makecdf treats directories somewhat differently than other types of
      files.  (See the last example in the EXAMPLES section.)

      makecdf does not overwrite existing elements of existing CDFs.

      It is not intended that makecdf be used for creating context-dependent
      HP-UX system files.  System files are created automatically during
      system installation or update.

 DEPENDENCIES
      NFS  Access control lists of networked files are summarized (as
           returned in st_mode by stat(2)), but not copied to the new file.




 Hewlett-Packard Company            - 3 -     HP-UX Release 9.0: August 1992






 makecdf(1M)                                                     makecdf(1M)





 AUTHOR
      makecdf was developed by HP.

 SEE ALSO
      cdf(4), context(5), clusterconf(4), acl(5).

















































 Hewlett-Packard Company            - 4 -     HP-UX Release 9.0: August 1992