Print this page
9696 add /etc/system.d support
Portions contributed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: C Fraire <cfraire@me.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man4/system.4
+++ new/usr/src/man/man4/system.4
1 1 '\" te
2 2 .\" Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
3 3 .\" Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
4 +.\" Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
4 5 .\" Copyright 1989 AT&T
5 6 .\" 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.
6 7 .\" 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.
7 8 .\" 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]
8 -.TH SYSTEM 4 "Jan 25, 2016"
9 +.TH SYSTEM 4 "Jan 29, 2019"
9 10 .SH NAME
10 11 system \- system configuration information file
11 12 .SH DESCRIPTION
12 13 .LP
13 14 The \fBsystem\fR file is used for customizing the operation of the operating
14 15 system kernel. The recommended procedure is to preserve the original
15 16 \fBsystem\fR file before modifying it.
16 17 .sp
17 18 .LP
19 +It is not recommended to edit the \fB/etc/system\fR file directly but rather
20 +to deliver configuration fragments into files under \fB/etc/system.d\fR;
21 +files in this directory are combined in alphabetical order and read by the
22 +kernel before \fB/etc/system\fR is processed. Directives in \fB/etc/system\fR
23 +therefore take precedence over any settings delivered in fragment files.
24 +.sp
25 +.LP
26 +The recommended naming schema for the fragment files is to use the name of
27 +the package which is delivering the file with '\fB/\fR' characters replaced
28 +by '\fB:\fR'; file names that start with a dot (\fB.\fR) will be ignored.
29 +.sp
30 +.LP
31 +If \fB/etc/system.d/\fR exists and contains any fragment files,
32 +then the directory must also be writable or it will not be possible to
33 +create or update the system boot archive.
34 +.sp
35 +.LP
18 36 The \fBsystem\fR file contains commands which are read by the kernel during
19 37 initialization and used to customize the operation of your system. These
20 38 commands are useful for modifying the system's treatment of its loadable kernel
21 39 modules.
22 40 .sp
23 41 .LP
24 42 The syntax of the \fBsystem\fR file consists of a list of keyword/value pairs
25 43 which are recognized by the system as valid commands. Comment lines must begin
26 44 with an asterisk (\fB*\fR) or a hash mark (\fB#\fR) and end with a newline
27 45 character. All commands are case-insensitive except where noted.
28 46 .sp
29 47 .LP
30 48 Commands that modify the system's operation with respect to loadable kernel
31 49 modules require you to specify the module type by listing the module's
32 50 namespace. The following namespaces are currently supported on all platforms:
33 51 .sp
34 52 .ne 2
35 53 .na
36 54 \fB\fBdrv\fR\fR
37 55 .ad
38 56 .RS 10n
39 57 Modules in this namespace are device drivers.
40 58 .RE
41 59
42 60 .sp
43 61 .ne 2
44 62 .na
45 63 \fB\fBexec\fR\fR
46 64 .ad
47 65 .RS 10n
48 66 Modules in this namespace are execution format modules. The following
49 67 \fBexec\fR modules are currently provided:
50 68 .sp
51 69 .ne 2
52 70 .na
53 71 \fBOnly on SPARC system:\fR
54 72 .ad
55 73 .RS 28n
56 74 .sp
57 75 .in +2
58 76 .nf
59 77 aoutexec
60 78 .fi
61 79 .in -2
62 80 .sp
63 81
64 82 .RE
65 83
66 84 .sp
67 85 .ne 2
68 86 .na
69 87 \fBOnly on x86 system:\fR
70 88 .ad
71 89 .RS 28n
72 90 .sp
73 91 .in +2
74 92 .nf
75 93 coffexec
76 94 .fi
77 95 .in -2
78 96 .sp
79 97
80 98 .RE
81 99
82 100 .sp
83 101 .ne 2
84 102 .na
85 103 \fBOn SPARC and IA systems:\fR
86 104 .ad
87 105 .RS 28n
88 106 .sp
89 107 .in +2
90 108 .nf
91 109 elfexec
92 110 intpexec
93 111 javaexec
94 112 .fi
95 113 .in -2
96 114 .sp
97 115
98 116 .RE
99 117
100 118 .RE
101 119
102 120 .sp
103 121 .ne 2
104 122 .na
105 123 \fB\fBfirmware\fR\fR
106 124 .ad
107 125 .RS 10n
108 126 Raw firmware images in subdirectories, one for each device driver
109 127 module using \fBfirmload\fR(9F).
110 128 .RE
111 129
112 130 .sp
113 131 .ne 2
114 132 .na
115 133 \fB\fBfs\fR\fR
116 134 .ad
117 135 .RS 10n
118 136 These modules are filesystems.
119 137 .RE
120 138
121 139 .sp
122 140 .ne 2
123 141 .na
124 142 \fB\fBsched\fR\fR
125 143 .ad
126 144 .RS 10n
127 145 These modules implement a process scheduling algorithm.
128 146 .RE
129 147
130 148 .sp
131 149 .ne 2
132 150 .na
133 151 \fB\fBstrmod\fR\fR
134 152 .ad
135 153 .RS 10n
136 154 These modules are \fBSTREAMS\fR modules.
137 155 .RE
138 156
139 157 .sp
140 158 .ne 2
141 159 .na
142 160 \fB\fBsys\fR\fR
143 161 .ad
144 162 .RS 10n
145 163 These modules implement loadable system-call modules.
146 164 .RE
147 165
148 166 .sp
149 167 .ne 2
150 168 .na
151 169 \fB\fBmisc\fR\fR
152 170 .ad
153 171 .RS 10n
154 172 These modules do not fit into any of the above categories, so are considered
155 173 "miscellaneous" modules.
156 174 .RE
157 175
158 176 .sp
159 177 .LP
160 178 SPARC only:
161 179 .sp
162 180 .ne 2
163 181 .na
164 182 \fB\fBdacf\fR\fR
165 183 .ad
166 184 .RS 8n
167 185 These modules provide rules and actions for device auto-configuration.
168 186 .RE
169 187
170 188 .sp
171 189 .ne 2
172 190 .na
173 191 \fB\fBtod\fR\fR
174 192 .ad
175 193 .RS 8n
176 194 These modules provide support for the time of day hardware.
177 195 .RE
178 196
179 197 .sp
180 198 .ne 2
181 199 .na
182 200 \fB\fBcpu\fR\fR
183 201 .ad
184 202 .RS 8n
185 203 These modules provide \fBCPU\fR-specific kernel routines.
186 204 .RE
187 205
188 206 .sp
189 207 .LP
190 208 A description of each of the supported commands follows:
191 209 .sp
192 210 .ne 2
193 211 .na
194 212 \fB\fBexclude:\fR <\fInamespace\fR>/<\fImodulename\fR>\fR
195 213 .ad
196 214 .sp .6
197 215 .RS 4n
198 216 Do not allow the listed loadable kernel module to be loaded. \fBexclude\fR
199 217 commands are cumulative; the list of modules to \fBexclude\fR is created by
200 218 combining every \fBexclude\fR entry in the \fBsystem\fR file.
201 219 .RE
202 220
203 221 .sp
204 222 .ne 2
205 223 .na
206 224 \fB\fBinclude:\fR <\fInamespace\fR>/<\fImodulename\fR>\fR
207 225 .ad
208 226 .sp .6
209 227 .RS 4n
210 228 Include the listed loadable kernel module. This is the system's default, so
211 229 using \fBinclude\fR does not modify the system's operation. \fBinclude\fR
212 230 commands are cumulative.
213 231 .RE
214 232
215 233 .sp
216 234 .ne 2
217 235 .na
218 236 \fB\fBforceload:\fR <\fInamespace\fR>/<\fImodulename\fR>\fR
219 237 .ad
220 238 .sp .6
221 239 .RS 4n
222 240 Force this kernel module to be loaded during kernel initialization. The default
223 241 action is to automatically load the kernel module when its services are first
224 242 accessed. \fBforceload\fR commands are cumulative.
225 243 .RE
226 244
227 245 .sp
228 246 .ne 2
229 247 .na
230 248 \fB\fBrootdev:\fR <\fIdevice name\fR>\fR
231 249 .ad
232 250 .sp .6
233 251 .RS 4n
234 252 Set the root device to the listed value instead of using the default root
235 253 device as supplied by the boot program.
236 254 .RE
237 255
238 256 .sp
239 257 .ne 2
240 258 .na
241 259 \fB\fBrootfs:\fR <\fIroot filesystem type\fR>\fR
242 260 .ad
243 261 .sp .6
244 262 .RS 4n
245 263 Set the root filesystem type to the listed value.
246 264 .RE
247 265
248 266 .sp
249 267 .ne 2
250 268 .na
251 269 \fB\fBmoddir:\fR <\fIfirst module path\fR>[[{:, }<\fIsecond ...\fR>]...]\fR
252 270 .ad
253 271 .sp .6
254 272 .RS 4n
255 273 Set the search path for loadable kernel modules. This command operates very
256 274 much like the \fBPATH\fR shell variable. Multiple directories to search can be
257 275 listed together, delimited either by blank spaces or colons.
258 276 .RE
259 277
260 278 .sp
261 279 .ne 2
262 280 .na
263 281 \fB\fBset\fR [\fI<module>\fR:]\fI<symbol>\fR {=, |, &} [~][-]\fI<value>\fR\fR
264 282 .ad
265 283 .sp .6
266 284 .RS 4n
267 285 Set an integer or character pointer in the kernel or in the selected kernel
268 286 module to a new value. This command is used to change kernel and module
269 287 parameters and thus modify the operation of your system. Assignment operations
270 288 are not cumulative, whereas bitwise \fBAND\fR and \fBOR\fR operations are
271 289 cumulative.
272 290 .sp
273 291 Operations that are supported for modifying integer variables are: simple
274 292 assignment, inclusive bitwise \fBOR,\fR bitwise \fBAND,\fR one's complement,
275 293 and negation. Variables in a specific loadable module can be targeted for
276 294 modification by specifying the variable name prefixed with the kernel module
277 295 name and a colon (:) separator. Values can be specified as hexadecimal (0x10),
278 296 Octal (046), or Decimal (5).
↓ open down ↓ |
251 lines elided |
↑ open up ↑ |
279 297 .sp
280 298 The only operation supported for modifying character pointers is simple
281 299 assignment. Static string data such as character arrays cannot be modified
282 300 using the \fBset\fR command. Use care and ensure that the variable you are
283 301 modifying is in fact a character pointer. The \fBset\fR command is very
284 302 powerful, and will likely cause problems if used carelessly. The following
285 303 escape sequences are supported within the quoted string:
286 304 .sp
287 305 .in +2
288 306 .nf
289 -\en (newline)
290 -\et (tab)
291 -\eb (backspace)
307 +\en (newline)
308 +\et (tab)
309 +\eb (backspace)
292 310 .fi
293 311 .in -2
294 312 .sp
295 313
296 314 .RE
297 315
298 316 .SH EXAMPLES
299 317 .LP
300 318 \fBExample 1 \fRA sample \fBsystem\fR file.
301 319 .sp
302 320 .LP
303 321 The following is a sample \fBsystem\fR file.
304 322
305 323 .sp
306 324 .in +2
307 325 .nf
308 326 * Force the ELF exec kernel module to be loaded during kernel
309 327 * initialization. Execution type modules are in the exec namespace.
310 328 forceload: exec/elfexec
311 329 * Change the root device to /sbus@1,f8000000/esp@0,800000/sd@3,0:a.
312 330 * You can derive root device names from /devices.
313 331 * Root device names must be the fully expanded Open Boot Prom
314 332 * device name. This command is platform and configuration specific.
315 333 * This example uses the first partition (a) of the SCSI disk at
316 334 * SCSI target 3 on the esp host adapter in slot 0 (on board)
317 335 * of the SBus of the machine.
318 336 * Adapter unit-address 3,0 at sbus unit-address 0,800000.
319 337 rootdev: /sbus@1,f8000000/esp@0,800000/sd@3,0:a
320 338 * Set the filesystem type of the root to ufs. Note that
321 339 * the equal sign can be used instead of the colon.
322 340 rootfs:ufs
323 341 * Set the search path for kernel modules to look first in
324 342 * /usr/phil/mod_test for modules, then in /kernel/modules (the
325 343 * default) if not found. Useful for testing new modules.
326 344 * Note that you can delimit your module pathnames using
327 345 * colons instead of spaces: moddir:/newmodules:/kernel/modules
328 346 moddir:/usr/phil/mod_test /kernel/modules.
329 347 * Set the configuration option {_POSIX_CHOWN_RESTRICTED} :
330 348 * This configuration option is enabled by default.
331 349 set rstchown = 1
332 350 * Disable the configuration option {_POSIX_CHOWN_RESTRICTED} :
333 351 set rstchown = 0
334 352 * Turn on debugging messages in the modules mydriver. This is useful
335 353 * during driver development.
336 354 set mydriver:debug = 1
337 355 * Bitwise AND the kernel variable "moddebug" with the
338 356 * one's complement of the hex value 0x880, and set
339 357 * "moddebug" to this new value.
340 358 set moddebug & ~0x880
341 359 * Demonstrate the cumulative effect of the SET
342 360 * bitwise AND/OR operations by further modifying "moddebug"
343 361 * by ORing it with 0x40.
344 362 set moddebug | 0x40
345 363 .fi
346 364 .in -2
347 365 .sp
348 366
349 367 .SH SEE ALSO
350 368 .LP
351 369 \fBboot\fR(1M), \fBinit\fR(1M), \fBkernel\fR(1M)
352 370 .SH WARNINGS
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
353 371 .LP
354 372 Use care when modifying the \fBsystem\fR file; it modifies the operation of the
355 373 kernel. If you preserved the original \fBsystem\fR file, you can boot using
356 374 \fBboot -a\fR, which will ask you to specify the path to the saved file. This
357 375 should allow the system to boot correctly. If you cannot locate a \fBsystem\fR
358 376 file that will work, you may specify \fB/dev/null\fR. This acts as an empty
359 377 \fBsystem\fR file, and the system will attempt to boot using its default
360 378 settings.
361 379 .SH NOTES
362 380 .LP
363 -The \fB/etc/system\fR file is read only once, at boot time.
381 +The \fBsystem\fR files are read only once, at boot time.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX