8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / installf.1m
blob5adc8fed43af77ff1dd28a3b789c4f26199707ae
1 '\" te
2 .\"  Copyright 1989 AT&T Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH INSTALLF 1M "Oct 30, 2007"
7 .SH NAME
8 installf \- add a file to the software installation database
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBinstallf\fR [\fB-c\fR \fIclass\fR] [ [\fB-M\fR] \fB-R\fR \fIroot_path\fR] [\fB-V\fR \fIfs_file\fR] \fIpkginst\fR \fIpathname\fR
13      [\fIftype\fR [\fImajor\fR \fIminor\fR] [\fImode\fR \fIowner\fR \fIgroup\fR]]
14 .fi
16 .LP
17 .nf
18 \fBinstallf\fR [\fB-c\fR \fIclass\fR] [ [\fB-M\fR] \fB-R\fR \fIroot_path\fR] [\fB-V\fR \fIfs_file\fR] \fIpkginst\fR -
19 .fi
21 .LP
22 .nf
23 \fBinstallf\fR \fB-f\fR [\fB-c\fR \fIclass\fR] [ [\fB-M\fR] \fB-R\fR \fIroot_path\fR] [\fB-V\fR \fIfs_file\fR] \fIpkginst\fR
24 .fi
26 .SH DESCRIPTION
27 .sp
28 .LP
29 \fBinstallf\fR informs the system that a pathname not listed in the
30 \fBpkgmap\fR(4) file is being created or modified. It should be invoked before
31 any file modifications have occurred.
32 .sp
33 .LP
34 When the second synopsis is used, the pathname descriptions will be read from
35 standard input. These descriptions are the same as would be given in the first
36 synopsis but the information is given in the form of a list. The descriptions
37 should be in the form:
38 .sp
39 .LP
40 \fIpathname\fR [ \fIftype\fR [\| \fImajor\fR \fIminor\fR ] [ \fImode\fR
41 \fIowner\fR \fIgroup\fR ]\|]
42 .sp
43 .LP
44 After all files have been appropriately created and/or modified, \fBinstallf\fR
45 should be invoked with the \fB-f\fR synopsis to indicate that installation is
46 final. Links will be created at this time and, if attribute information for a
47 pathname was not specified during the original invocation of \fBinstallf\fR, or
48 was not already stored on the system, the current attribute values for the
49 pathname will be stored. Otherwise, \fBinstallf\fR verifies that attribute
50 values match those given on the command line, making corrections as necessary.
51 In all cases, the current content information is calculated and stored
52 appropriately.
53 .sp
54 .LP
55 Package commands are \fBlargefile\fR(5)-aware. They handle files larger than 2
56 GB in the same way they handle smaller files. In their current implementations,
57 \fBpkgadd\fR(1M), \fBpkgtrans\fR(1) and other package commands can process a
58 datastream of  up to 4 GB.
59 .SH OPTIONS
60 .sp
61 .ne 2
62 .na
63 \fB\fB-c\fR \fIclass\fR\fR
64 .ad
65 .RS 16n
66 Class to which installed objects should be associated. Default class is
67 \fBnone\fR.
68 .RE
70 .sp
71 .ne 2
72 .na
73 \fB\fB-f\fR\fR
74 .ad
75 .RS 16n
76 Indicates that installation is complete. This option is used with the final
77 invocation of \fBinstallf\fR (for all files of a given class).
78 .RE
80 .sp
81 .ne 2
82 .na
83 \fB\fB-M\fR\fR
84 .ad
85 .RS 16n
86 Instruct \fBinstallf\fR not to use the \fB$\fR\fIroot_path\fR\fB/etc/vfstab\fR
87 file for determining the client's mount points. This option assumes the mount
88 points are correct on the server and it behaves consistently with Solaris 2.5
89 and earlier releases.
90 .RE
92 .sp
93 .ne 2
94 .na
95 \fB\fB\fR\fB-R\fR \fIroot_path\fR\fR
96 .ad
97 .RS 16n
98 Define the full path name of a directory to use as the \fIroot_path\fR. All
99 files, including package system information files, are relocated to a directory
100 tree starting in the specified \fIroot_path\fR. The \fIroot_path\fR can be
101 specified when installing to a client from a server (for example,
102 \fB/export/root/client1\fR).
104 \fBinstallf\fR inherits the value of the \fBPKG_INSTALL_ROOT\fR environment
105 variable. (See ENVIRONMENT VARIABLES, below.) If \fBPKG_INSTALL_ROOT\fR is set,
106 such as when the \fB-R\fR option is used with \fBpkgadd\fR(1M) or
107 \fBpkgrm\fR(1M), there is no need to use the \fBinstallf\fR \fB-R\fR option.
109 Note -
111 .RS 2
112 The root file system of any non-global zones must not be referenced with the
113 \fB-R\fR option. Doing so might damage the global zone's file system, might
114 compromise the security of the global zone, and might damage the non-global
115 zone's file system. See \fBzones\fR(5).
120 .ne 2
122 \fB\fB-V\fR \fIfs_file\fR\fR
124 .RS 16n
125 Specify an alternative \fIfs_file\fR to map the client's file systems. For
126 example, used in situations where the \fB$\fR\fIroot_path\fR\fB/etc/vfstab\fR
127 file is non-existent or unreliable.
130 .SH OPERANDS
132 .ne 2
134 \fB\fIpkginst\fR\fR
136 .RS 12n
137 Name of package instance with which the pathname should be associated.
141 .ne 2
143 \fB\fIpathname\fR\fR
145 .RS 12n
146 Pathname that is being created or modified.
150 .ne 2
152 \fB\fIftype\fR\fR
154 .RS 12n
155 A one-character field that indicates the file type. Possible file types
156 include:
158 .ne 2
160 \fB\fBb\fR\fR
162 .RS 5n
163 block special device
167 .ne 2
169 \fB\fBc\fR\fR
171 .RS 5n
172 character special device
176 .ne 2
178 \fB\fBd\fR\fR
180 .RS 5n
181 directory
185 .ne 2
187 \fB\fBe\fR\fR
189 .RS 5n
190 a file to be edited upon installation or removal
194 .ne 2
196 \fB\fBf\fR\fR
198 .RS 5n
199 a standard executable or data file
203 .ne 2
205 \fB\fBl\fR\fR
207 .RS 5n
208 linked file
212 .ne 2
214 \fB\fBp\fR\fR
216 .RS 5n
217 named pipe
221 .ne 2
223 \fB\fBs\fR\fR
225 .RS 5n
226 symbolic link
230 .ne 2
232 \fB\fBv\fR\fR
234 .RS 5n
235 volatile file (one whose contents are expected to change)
239 .ne 2
241 \fB\fBx\fR\fR
243 .RS 5n
244 an exclusive directory
250 .ne 2
252 \fB\fImajor\fR\fR
254 .RS 12n
255 The major device number. The field is only specified for block or character
256 special devices.
260 .ne 2
262 \fB\fIminor\fR\fR
264 .RS 12n
265 The minor device number. The field is only specified for block or character
266 special devices.
270 .ne 2
272 \fB\fImode\fR\fR
274 .RS 12n
275 The octal mode of the file (for example, 0664). A question mark (\fB?\fR)
276 indicates that the mode will be left unchanged, implying that the file already
277 exists on the target machine. This field is not used for linked or symbolically
278 linked files.
282 .ne 2
284 \fB\fIowner\fR\fR
286 .RS 12n
287 The owner of the file (for example, \fBbin\fR or \fBroot\fR). The field is
288 limited to 14 characters in length. A question mark (\fB?\fR) indicates that
289 the owner will be left unchanged, implying that the file already exists on the
290 target machine. This field is not used for linked or symbolically linked files.
294 .ne 2
296 \fB\fIgroup\fR\fR
298 .RS 12n
299 The group to which the file belongs (for example, \fBbin\fR or \fBsys\fR). The
300 field is limited to 14 characters in length. A question mark (\fB?\fR)
301 indicates that the group will be left unchanged, implying that the file already
302 exists on the target machine. This field is not used for linked or symbolically
303 linked files.
306 .SH EXAMPLES
308 \fBExample 1 \fRBasic Usage
311 The following example shows the use of \fBinstallf\fR, invoked from an optional
312 pre-install or post-install script:
315 .in +2
317 # create /dev/xt directory
318 # (needs to be done before drvinstall)
319 installf $PKGINST /dev/xt d 755 root sys ||
320         exit 2
321 majno=`/usr/sbin/drvinstall \fB-m\fR /etc/master.d/xt
322      \fB-d\fR $BASEDIR/data/xt.o \fB-v\fR1.0` ||
323         exit 2
324 i=00
325 while [ $i \(milt $limit ]
327     for j in 0 1 2 3 4 5 6 7
328     do
329         echo /dev/xt$i$j c $majno `expr $i ? 8 + $j`
330              644 root sys |
331         echo /dev/xt$i$j=/dev/xt/$i$j
332     done
333     i=`expr $i + 1`
334     [ $i \(mile 9 ] && i="0$i" #add leading zero
335 done | installf $PKGINST \(mi || exit 2
336 # finalized installation, create links
337 installf \fB-f\fR $PKGINST || exit 2
339 .in -2
342 .SH ENVIRONMENT VARIABLES
345 \fBinstallf\fR inherits the value of the following environment variable. This
346 variable is set when \fBpkgadd\fR(1M) or \fBpkgrm\fR(1M) is invoked with the
347 \fB-R\fR option.
349 .ne 2
351 \fB\fBPKG_INSTALL_ROOT\fR\fR
353 .RS 20n
354 If present, defines the full path name of a directory to use as the system's
355 \fBPKG_INSTALL_ROOT\fR path. All product and package information files are then
356 looked for in the directory tree, starting with the specified
357 \fBPKG_INSTALL_ROOT\fR path. If not present, the default system path of \fB/\fR
358 is used.
361 .SH EXIT STATUS
363 .ne 2
365 \fB\fB0\fR\fR
367 .RS 6n
368 Successful operation.
372 .ne 2
374 \fB\fB>0\fR\fR
376 .RS 6n
377 An error occurred.
380 .SH SEE ALSO
383 \fBpkginfo\fR(1), \fBpkgmk\fR(1), \fBpkgparam\fR(1), \fBpkgproto\fR(1),
384 \fBpkgtrans\fR(1), \fBpkgadd\fR(1M), \fBpkgask\fR(1M), \fBpkgchk\fR(1M),
385 \fBpkgrm\fR(1M), \fBremovef\fR(1M), \fBpkgmap\fR(4), \fBspace\fR(4),
386 \fBattributes\fR(5), \fBlargefile\fR(5)
389 \fI\fR
390 .SH NOTES
393 When \fIftype\fR is specified, all applicable fields, as shown below, must be
394 defined:
399 box;
400 l l
401 l l .
402 \fIftype\fR     Required Fields
403 \fBp\fR, \fBx\fR, \fBd\fR, \fBf\fR, \fBv\fR, or \fBe\fR \fBmode  owner  group\fR
404 \fBc\fR or \fBb\fR      \fBmajor  minor mode  owner  group\fR
409 The \fBinstallf\fR command will create directories, named pipes and special
410 devices on the original invocation. Links are created when \fBinstallf\fR is
411 invoked with the \fB-f\fR option to indicate installation is complete.
414 Links should be specified as \fIpath1\fR\fB=\fR\fIpath2.\fR \fIpath1\fR
415 indicates the destination and \fIpath2\fR indicates the source file.
418 Files installed with \fBinstallf\fR will be placed in the class \fBnone\fR,
419 unless a class is defined with the command. Subsequently, they will be removed
420 when the associated package is deleted. If this file should not be deleted at
421 the same time as the package, be certain to assign it to a class which is
422 ignored at removal time. If special action is required for the file before
423 removal, a class must be defined with the command and an appropriate class
424 action script delivered with the package.
427 When classes are used, \fBinstallf\fR must be used in one of the following
428 forms:
430 .in +2
432 installf \fB-c\fR class1 .\|.\|.\|
433 installf \fB-f\fR \fB-c\fR class1 .\|.\|.\|
434 installf \fB-c\fR class2 .\|.\|.\|
435 installf \fB-f\fR \fB-c\fR class2 .\|.\|.\|
437 .in -2