xref: /titanic_50/usr/src/tools/pmodes/README.pmodes (revision 2df1fe9ca32bb227b9158c67f5c00b54c20b10fd)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22/*
23 * Copyright (c) 1999-2001 by Sun Microsystems, Inc.
24 * All rights reserved.
25 */
26
27#ident	"%Z%%M%	%I%	%E% SMI"
28
29Pmodes is a program that updates pkgmap files or pkg prototype files.
30
31
32Usage: pmodes [-somwDeNndvqP] [-r file] directory  .. proto/pkgmap file....
33
34
35
36Options that modify what is changed:
37
38	-s 	Strip read and write permissions from setgid/setuid executables.
39	-o	Do not change ownership to root
40	-m	Do not change file permissions (modes)
41	-w 	Do not strip owner write permissions from non-root owned
42		binaries
43	-e	Do not change 'e' or 'v' (editable or volatile) files
44		(they are only affected when owned by bin)
45	-D	Limit changes to directories only.
46
47Options that modify the output:
48	-n	Create a <file>.new file
49	-N	Overwrite the original pkgmap/proto file with the new file;
50		old pkgmap/proto file saved as file.old
51	-d	Produce "diff-style" output
52	-P	Ignore pkgmap files in directories.
53	-q	Do not produce error messages about directories w/ pkginfo*
54		files
55	-v	Preceed the output caused by each processed file by a
56		shortened version of the filename.
57
58	-r file	Restrict the test to the pathnames listed in "file"
59
60
61In default mode of operation, pmodes processes each argument.
62If an argument is a directory, it will first look for a pkginfo or
63pkginfo.tmpl file n order to learn the BASEDIR; it will than process
64the directory converting either the pkgmap file or, if the pkgmap file
65doesn't exist or the -P option is specified, the prototype_* files
66Names that contain .old or .new will be ignored.  If an argument is a file,
67the pkginfo* file in the same directory is used to learn the BASEDIR.
68
69Pmodes outputs a line for each change made:
70
71e m 0664 -> 0644 /var/adm/wtmpx
72d m 0775 -> 0755 /usr/lib
73d o bin -> root /usr/include/sys [755]
74f o bin -> root /usr/include/sys/cg6reg.h [0644]
75f o bin -> root /usr/include/sys/cg6var.h [0644]
76
77The first field is the "pkgmap" file type; the second field is the type
78of modification (m for mode, o for ownership).  This is followed by the
79change mode and the pathname.
80
81When ownership is changed, the file permissions are printed in square
82brackets.
83
84Multiple lines of output can be produced for a single file.
85
86With the -d option, output looks like:
87
88< d 0775 root sys /usr
89> d 0755 root sys /usr
90< d 0775 root bin /usr/include
91> d 0755 root bin /usr/include
92< d 1777 bin bin /var/preserve
93> d 1777 root bin /var/preserve
94< e 0664 root sys /etc/vfstab
95> e 0644 root sys /etc/vfstab
96
97And only one line per file is produced.
98
99