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.man.txt
+++ new/usr/src/man/man4/system.4.man.txt
1 1 SYSTEM(4) File Formats and Configurations SYSTEM(4)
2 2
3 3
↓ open down ↓ |
3 lines elided |
↑ open up ↑ |
4 4
5 5 NAME
6 6 system - system configuration information file
7 7
8 8 DESCRIPTION
9 9 The system file is used for customizing the operation of the operating
10 10 system kernel. The recommended procedure is to preserve the original
11 11 system file before modifying it.
12 12
13 13
14 + It is not recommended to edit the /etc/system file directly but rather
15 + to deliver configuration fragments into files under /etc/system.d;
16 + files in this directory are combined in alphabetical order and read by
17 + the kernel before /etc/system is processed. Directives in /etc/system
18 + therefore take precedence over any settings delivered in fragment
19 + files.
20 +
21 +
22 + The recommended naming schema for the fragment files is to use the name
23 + of the package which is delivering the file with '/' characters
24 + replaced by ':'; file names that start with a dot (.) will be ignored.
25 +
26 +
27 + If /etc/system.d/ exists and contains any fragment files, then the
28 + directory must also be writable or it will not be possible to create or
29 + update the system boot archive.
30 +
31 +
14 32 The system file contains commands which are read by the kernel during
15 33 initialization and used to customize the operation of your system.
16 34 These commands are useful for modifying the system's treatment of its
17 35 loadable kernel modules.
18 36
19 37
20 38 The syntax of the system file consists of a list of keyword/value pairs
21 39 which are recognized by the system as valid commands. Comment lines
22 40 must begin with an asterisk (*) or a hash mark (#) and end with a
23 41 newline character. All commands are case-insensitive except where
24 42 noted.
25 43
26 44
27 45 Commands that modify the system's operation with respect to loadable
28 46 kernel modules require you to specify the module type by listing the
29 47 module's namespace. The following namespaces are currently supported on
30 48 all platforms:
31 49
32 50 drv
33 51 Modules in this namespace are device drivers.
34 52
35 53
36 54 exec
37 55 Modules in this namespace are execution format modules. The
38 56 following exec modules are currently provided:
39 57
40 58 Only on SPARC system:
41 59
42 60 aoutexec
43 61
44 62
45 63
46 64
47 65 Only on x86 system:
48 66
49 67 coffexec
50 68
51 69
52 70
53 71
54 72 On SPARC and IA systems:
55 73
56 74 elfexec
57 75 intpexec
58 76 javaexec
59 77
60 78
61 79
62 80
63 81
64 82 firmware
65 83 Raw firmware images in subdirectories, one for each device
66 84 driver module using firmload(9F).
67 85
68 86
69 87 fs
70 88 These modules are filesystems.
71 89
72 90
73 91 sched
74 92 These modules implement a process scheduling algorithm.
75 93
76 94
77 95 strmod
78 96 These modules are STREAMS modules.
79 97
80 98
81 99 sys
82 100 These modules implement loadable system-call modules.
83 101
84 102
85 103 misc
86 104 These modules do not fit into any of the above categories, so
87 105 are considered "miscellaneous" modules.
88 106
89 107
90 108
91 109 SPARC only:
92 110
93 111 dacf
94 112 These modules provide rules and actions for device auto-
95 113 configuration.
96 114
97 115
98 116 tod
99 117 These modules provide support for the time of day hardware.
100 118
101 119
102 120 cpu
103 121 These modules provide CPU-specific kernel routines.
104 122
105 123
106 124
107 125 A description of each of the supported commands follows:
108 126
109 127 exclude: <namespace>/<modulename>
110 128
111 129 Do not allow the listed loadable kernel module to be loaded.
112 130 exclude commands are cumulative; the list of modules to exclude is
113 131 created by combining every exclude entry in the system file.
114 132
115 133
116 134 include: <namespace>/<modulename>
117 135
118 136 Include the listed loadable kernel module. This is the system's
119 137 default, so using include does not modify the system's operation.
120 138 include commands are cumulative.
121 139
122 140
123 141 forceload: <namespace>/<modulename>
124 142
125 143 Force this kernel module to be loaded during kernel initialization.
126 144 The default action is to automatically load the kernel module when
127 145 its services are first accessed. forceload commands are cumulative.
128 146
129 147
130 148 rootdev: <device name>
131 149
132 150 Set the root device to the listed value instead of using the
133 151 default root device as supplied by the boot program.
134 152
135 153
136 154 rootfs: <root filesystem type>
137 155
138 156 Set the root filesystem type to the listed value.
139 157
140 158
141 159 moddir: <first module path>[[{:, }<second ...>]...]
142 160
143 161 Set the search path for loadable kernel modules. This command
144 162 operates very much like the PATH shell variable. Multiple
145 163 directories to search can be listed together, delimited either by
146 164 blank spaces or colons.
147 165
148 166
149 167 set [<module>:]<symbol> {=, |, &} [~][-]<value>
150 168
151 169 Set an integer or character pointer in the kernel or in the
152 170 selected kernel module to a new value. This command is used to
153 171 change kernel and module parameters and thus modify the operation
154 172 of your system. Assignment operations are not cumulative, whereas
155 173 bitwise AND and OR operations are cumulative.
156 174
157 175 Operations that are supported for modifying integer variables are:
158 176 simple assignment, inclusive bitwise OR, bitwise AND, one's
159 177 complement, and negation. Variables in a specific loadable module
160 178 can be targeted for modification by specifying the variable name
161 179 prefixed with the kernel module name and a colon (:) separator.
162 180 Values can be specified as hexadecimal (0x10), Octal (046), or
163 181 Decimal (5).
164 182
165 183 The only operation supported for modifying character pointers is
166 184 simple assignment. Static string data such as character arrays
167 185 cannot be modified using the set command. Use care and ensure that
168 186 the variable you are modifying is in fact a character pointer. The
169 187 set command is very powerful, and will likely cause problems if
170 188 used carelessly. The following escape sequences are supported
171 189 within the quoted string:
172 190
173 191 \n (newline)
174 192 \t (tab)
175 193 \b (backspace)
176 194
177 195
178 196
179 197
180 198 EXAMPLES
181 199 Example 1 A sample system file.
182 200
183 201
184 202 The following is a sample system file.
185 203
186 204
187 205 * Force the ELF exec kernel module to be loaded during kernel
188 206 * initialization. Execution type modules are in the exec namespace.
189 207 forceload: exec/elfexec
190 208 * Change the root device to /sbus@1,f8000000/esp@0,800000/sd@3,0:a.
191 209 * You can derive root device names from /devices.
192 210 * Root device names must be the fully expanded Open Boot Prom
193 211 * device name. This command is platform and configuration specific.
194 212 * This example uses the first partition (a) of the SCSI disk at
195 213 * SCSI target 3 on the esp host adapter in slot 0 (on board)
196 214 * of the SBus of the machine.
197 215 * Adapter unit-address 3,0 at sbus unit-address 0,800000.
198 216 rootdev: /sbus@1,f8000000/esp@0,800000/sd@3,0:a
199 217 * Set the filesystem type of the root to ufs. Note that
200 218 * the equal sign can be used instead of the colon.
201 219 rootfs:ufs
202 220 * Set the search path for kernel modules to look first in
203 221 * /usr/phil/mod_test for modules, then in /kernel/modules (the
204 222 * default) if not found. Useful for testing new modules.
205 223 * Note that you can delimit your module pathnames using
206 224 * colons instead of spaces: moddir:/newmodules:/kernel/modules
207 225 moddir:/usr/phil/mod_test /kernel/modules.
208 226 * Set the configuration option {_POSIX_CHOWN_RESTRICTED} :
209 227 * This configuration option is enabled by default.
210 228 set rstchown = 1
211 229 * Disable the configuration option {_POSIX_CHOWN_RESTRICTED} :
212 230 set rstchown = 0
213 231 * Turn on debugging messages in the modules mydriver. This is useful
214 232 * during driver development.
215 233 set mydriver:debug = 1
216 234 * Bitwise AND the kernel variable "moddebug" with the
217 235 * one's complement of the hex value 0x880, and set
218 236 * "moddebug" to this new value.
219 237 set moddebug & ~0x880
220 238 * Demonstrate the cumulative effect of the SET
221 239 * bitwise AND/OR operations by further modifying "moddebug"
222 240 * by ORing it with 0x40.
223 241 set moddebug | 0x40
224 242
225 243
226 244
227 245 SEE ALSO
228 246 boot(1M), init(1M), kernel(1M)
229 247
↓ open down ↓ |
206 lines elided |
↑ open up ↑ |
230 248 WARNINGS
231 249 Use care when modifying the system file; it modifies the operation of
232 250 the kernel. If you preserved the original system file, you can boot
233 251 using boot -a, which will ask you to specify the path to the saved
234 252 file. This should allow the system to boot correctly. If you cannot
235 253 locate a system file that will work, you may specify /dev/null. This
236 254 acts as an empty system file, and the system will attempt to boot using
237 255 its default settings.
238 256
239 257 NOTES
240 - The /etc/system file is read only once, at boot time.
258 + The system files are read only once, at boot time.
241 259
242 260
243 261
244 - January 25, 2016 SYSTEM(4)
262 + January 29, 2019 SYSTEM(4)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX