1installf(1M) System Administration Commands installf(1M)
2
3
4
6 installf - add a file to the software installation database
7
9 installf [-c class] [ [-M] -R root_path] [-V fs_file] pkginst pathname
10 [ftype [major minor] [mode owner group]]
11
12
13 installf [-c class] [ [-M] -R root_path] [-V fs_file] pkginst -
14
15
16 installf -f [-c class] [ [-M] -R root_path] [-V fs_file] pkginst
17
18
20 installf informs the system that a pathname not listed in the pkgmap(4)
21 file is being created or modified. It should be invoked before any file
22 modifications have occurred.
23
24
25 When the second synopsis is used, the pathname descriptions will be
26 read from standard input. These descriptions are the same as would be
27 given in the first synopsis but the information is given in the form of
28 a list. The descriptions should be in the form:
29
30
31 pathname [ ftype [ major minor ] [ mode owner group ]]
32
33
34 After all files have been appropriately created and/or modified,
35 installf should be invoked with the -f synopsis to indicate that
36 installation is final. Links will be created at this time and, if
37 attribute information for a pathname was not specified during the orig‐
38 inal invocation of installf, or was not already stored on the system,
39 the current attribute values for the pathname will be stored. Other‐
40 wise, installf verifies that attribute values match those given on the
41 command line, making corrections as necessary. In all cases, the cur‐
42 rent content information is calculated and stored appropriately.
43
44
45 Package commands are largefile(5)-aware. They handle files larger than
46 2 GB in the same way they handle smaller files. In their current imple‐
47 mentations, pkgadd(1M), pkgtrans(1) and other package commands can
48 process a datastream of up to 4 GB.
49
51 -c class Class to which installed objects should be associated.
52 Default class is none.
53
54
55 -f Indicates that installation is complete. This option is
56 used with the final invocation of installf (for all
57 files of a given class).
58
59
60 -M Instruct installf not to use the $root_path/etc/vfstab
61 file for determining the client's mount points. This
62 option assumes the mount points are correct on the
63 server and it behaves consistently with Solaris 2.5 and
64 earlier releases.
65
66
67 -R root_path Define the full path name of a directory to use as the
68 root_path. All files, including package system informa‐
69 tion files, are relocated to a directory tree starting
70 in the specified root_path. The root_path can be speci‐
71 fied when installing to a client from a server (for
72 example, /export/root/client1).
73
74 installf inherits the value of the PKG_INSTALL_ROOT
75 environment variable. (See ENVIRONMENT VARIABLES,
76 below.) If PKG_INSTALL_ROOT is set, such as when the -R
77 option is used with pkgadd(1M) or pkgrm(1M), there is
78 no need to use the installf -R option.
79
80 Note -
81
82 The root file system of any non-global zones must not
83 be referenced with the -R option. Doing so might dam‐
84 age the global zone's file system, might compromise
85 the security of the global zone, and might damage the
86 non-global zone's file system. See zones(5).
87
88
89 -V fs_file Specify an alternative fs_file to map the client's file
90 systems. For example, used in situations where the
91 $root_path/etc/vfstab file is non-existent or unreli‐
92 able.
93
94
96 pkginst Name of package instance with which the pathname should be
97 associated.
98
99
100 pathname Pathname that is being created or modified.
101
102
103 ftype A one-character field that indicates the file type. Possi‐
104 ble file types include:
105
106 b block special device
107
108
109 c character special device
110
111
112 d directory
113
114
115 e a file to be edited upon installation or removal
116
117
118 f a standard executable or data file
119
120
121 l linked file
122
123
124 p named pipe
125
126
127 s symbolic link
128
129
130 v volatile file (one whose contents are expected to
131 change)
132
133
134 x an exclusive directory
135
136
137
138 major The major device number. The field is only specified for
139 block or character special devices.
140
141
142 minor The minor device number. The field is only specified for
143 block or character special devices.
144
145
146 mode The octal mode of the file (for example, 0664). A question
147 mark (?) indicates that the mode will be left unchanged,
148 implying that the file already exists on the target
149 machine. This field is not used for linked or symbolically
150 linked files.
151
152
153 owner The owner of the file (for example, bin or root). The field
154 is limited to 14 characters in length. A question mark (?)
155 indicates that the owner will be left unchanged, implying
156 that the file already exists on the target machine. This
157 field is not used for linked or symbolically linked files.
158
159
160 group The group to which the file belongs (for example, bin or
161 sys). The field is limited to 14 characters in length. A
162 question mark (?) indicates that the group will be left
163 unchanged, implying that the file already exists on the
164 target machine. This field is not used for linked or sym‐
165 bolically linked files.
166
167
169 Example 1 Basic Usage
170
171
172 The following example shows the use of installf, invoked from an
173 optional pre-install or post-install script:
174
175
176 # create /dev/xt directory
177 # (needs to be done before drvinstall)
178 installf $PKGINST /dev/xt d 755 root sys ||
179 exit 2
180 majno=`/usr/sbin/drvinstall -m /etc/master.d/xt
181 -d $BASEDIR/data/xt.o -v1.0` ||
182 exit 2
183 i=00
184 while [ $i −lt $limit ]
185 do
186 for j in 0 1 2 3 4 5 6 7
187 do
188 echo /dev/xt$i$j c $majno `expr $i ? 8 + $j`
189 644 root sys |
190 echo /dev/xt$i$j=/dev/xt/$i$j
191 done
192 i=`expr $i + 1`
193 [ $i −le 9 ] && i="0$i" #add leading zero
194 done | installf $PKGINST − || exit 2
195 # finalized installation, create links
196 installf -f $PKGINST || exit 2
197
198
199
201 installf inherits the value of the following environment variable. This
202 variable is set when pkgadd(1M) or pkgrm(1M) is invoked with the -R
203 option.
204
205 PKG_INSTALL_ROOT If present, defines the full path name of a direc‐
206 tory to use as the system's PKG_INSTALL_ROOT path.
207 All product and package information files are then
208 looked for in the directory tree, starting with the
209 specified PKG_INSTALL_ROOT path. If not present,
210 the default system path of / is used.
211
212
214 0 Successful operation.
215
216
217 >0 An error occurred.
218
219
221 See attributes(5) for descriptions of the following attributes:
222
223
224
225
226 ┌─────────────────────────────┬─────────────────────────────┐
227 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
228 ├─────────────────────────────┼─────────────────────────────┤
229 │Availability │SUNWcsu │
230 └─────────────────────────────┴─────────────────────────────┘
231
233 pkginfo(1), pkgmk(1), pkgparam(1), pkgproto(1), pkgtrans(1),
234 pkgadd(1M), pkgask(1M), pkgchk(1M), pkgrm(1M), removef(1M), pkgmap(4),
235 space(4), attributes(5), largefile(5)
236
237
238
239
241 When ftype is specified, all applicable fields, as shown below, must be
242 defined:
243
244
245
246
247 ┌──────────────────────────────────────────────────────────────┐
248 │ftype Required Fields │
249 │p, x, d, f, v, or e mode owner group │
250 │c or b major minor mode owner group │
251 └──────────────────────────────────────────────────────────────┘
252
253
254 The installf command will create directories, named pipes and special
255 devices on the original invocation. Links are created when installf is
256 invoked with the -f option to indicate installation is complete.
257
258
259 Links should be specified as path1=path2. path1 indicates the destina‐
260 tion and path2 indicates the source file.
261
262
263 Files installed with installf will be placed in the class none, unless
264 a class is defined with the command. Subsequently, they will be removed
265 when the associated package is deleted. If this file should not be
266 deleted at the same time as the package, be certain to assign it to a
267 class which is ignored at removal time. If special action is required
268 for the file before removal, a class must be defined with the command
269 and an appropriate class action script delivered with the package.
270
271
272 When classes are used, installf must be used in one of the following
273 forms:
274
275 installf -c class1 ...
276 installf -f -c class1 ...
277 installf -c class2 ...
278 installf -f -c class2 ...
279
280
281
282
283
284SunOS 5.11 30 Oct 2007 installf(1M)