HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)
m
mkpdf(1M) mkpdf(1M)
NAME
mkpdf - create a Product Description File from a prototype PDF
SYNOPSIS
mkpdf [-c comment_string][
-n][-r
alternate_root] prototype_PDF new_PDF
DESCRIPTION
The
mkpdf program reads a prototype PDF and generates a new PDF (see pdf(4)) that reflects the current
status of the file system files defined by path names in the prototype file.
If pathname is a directory, the size, version, checksum, and linked_to target fields are forced to be empty.
If the file is a device, the version, checksum, and linked_to fields are forced to be empty and the size field
contains the major and minor device numbers.
If a path name in prototype_PDF is prefaced with a question mark (
?), the file is assumed to be an optional
file. This file is processed in the same manner as all other files except that, if the file does not exist, values
provided in the prototype are reproduced, and the
?, is passed through to new_PDF. If a path name is not
preceded with
?, and the file does not exist on the file system, an error is reported and no entry is added to
new_PDF.
If a dash (-) is used for prototype_PDF or new_PDF,
mkpdf assumes that standard input and/or standard
output, respectively, is being used for the appropriate value.
Comments in prototype_PDF are supported as follows: Lines beginning with the percent character (
%) are
generally passed through, in order, to new_PDF, except that any "
% Product Description File"
and "
% total size is ..." lines are removed to prevent duplication of these automatically gen-
erated lines in new_PDF when prototype_PDF is a PDF. Lines beginning with a pound character (
#), and
lines containing only the newline character (
\n) are not passed through to new_PDF. Note that blank
space preceding these special characters is not allowed and will generally result in error messages about
files not found.
A size summary is produced as a comment at the end of the PDF.
Options
-c comment_string Insert a string that contains a comment about the product for which this PDF is being
generated. This is used as a second comment line of the PDF. See pdf(4) for a
description of the first comment line. If this option is not specified, no second com-
ment line is produced.
-n Record numerical representation of user ID from
/etc/passwd and group ID from
/etc/group for each file instead of the usual text representation.
-r alternate_root Prefix the string alternate_root to each path name in the prototype (after removing
the optional
?) to form a modified path name to be used to gather attributes for the
entry. Default is an empty string.
EXAMPLES
Given a file Proto with contents:
/usr/bin/basename
/usr/bin/cat
/usr/bin/ccat
/usr/bin/dirname
/usr/bin/grep
/usr/bin/ls
/usr/bin/ll::::::::/usr/bin/ls
/usr/bin/su
the command:
mkpdf -c "fileset TEST, Release 1.0" Proto -
produces the PDF shown in the EXAMPLE section of pdf(4).
The following example creates a totally new PDF for the fileset ALBA_CORE. The pathname and linked_to
are taken from the prototype PDF. All other fields are generated from the file system.
mkpdf /tmp/ALBA_CORE /system/ALBA_CORE/new.pdf
Section 1M−−492 Hewlett-Packard Company − 1 − HP-UX 11i Version 1: September 2005