-
Notifications
You must be signed in to change notification settings - Fork 11
/
create_zone.conf.template
350 lines (299 loc) · 9.95 KB
/
create_zone.conf.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# config file for create_zone.sh v1.1.15, created Fri Sep 18 08:24:14 MEST 2009
# config file for create_zones.sh for zones with RCM support
#
# extension for backup files
DEFAULT_BACKUP_EXTENSION=".$$.backup"
## EXCLUSIVE_IP_STACK_CONFIG_FILES
## network configuration files that will be copied from the global zone
## to the non-global zone if an exclusive IP stack is used
## Note: Add only fully qualified filenames here!
##
EXCLUSIVE_IP_STACK_CONFIG_FILES="
/etc/netmasks
/etc/networks
/etc/defaultrouter
/etc/hosts
"
## NAME_SERVER_CONFIG_FILES
## name server configuration files
## Note: Add only fully qualified filenames here!
##
NAME_SERVER_CONFIG_FILES="
/etc/resolv.conf
/etc/nsswitch.conf
"
## DEFAULT_FREE_SPACE_FOR_THE_ZONE
## free space neccessary for the zone in KB
## (the default depends on the type of the zone)
##
DEFAULT_FREE_SPACE_FOR_THE_ZONE=""
## DEFAULT_FREE_SPACE_FOR_A_BIG_ZONE
## default free space needed for a big zone in kb
##
DEFAULT_FREE_SPACE_FOR_A_BIG_ZONE=3500000
## DEFAULT_FREE_SPACE_FOR_A_SMALL_ZONE
## default free space needed for a small zone in kb
##
DEFAULT_FREE_SPACE_FOR_A_SMALL_ZONE=200000
## DEFAULT_ZONE_MODE
## default type of the new zone;
## possible values: small (= sparse zone) or big (= whole root zone)
##
DEFAULT_ZONE_MODE="small"
## DEFAULT_ZONE_CLONE_SOURCE
## source zone for cloning
##
DEFAULT_ZONE_CLONE_SOURCE=""
## DEFAULT_ZONE_PATH
## base directory for zones (can be a symbolic link;
## this will be resolved by the script)
##
DEFAULT_ZONE_PATH="/zones"
## DEFAULT_ZONE_ROOT_PASSWORD
## default for the root password is the password
## of the existing root user
##
# DEFAULT_ZONE_ROOT_PASSWORD="$( grep root /etc/shadow 2>/dev/null | cut -f2 -d ":" )"
DEFAULT_ZONE_ROOT_PASSWORD="EnFQsCk8TXWVU"
## DEFAULT_ZONE_TZ
## the default timezone is the timezone of the machine
##
DEFAULT_ZONE_TZ="$( grep "^TZ=" /etc/TIMEZONE 2>/dev/null | cut -f2 -d"=" )"
[ "${DEFAULT_TZ}"x = ""x ] && DEFAULT_TZ="${TZ}"
## DEFAULT_ZONE_LOCALE
## default locale is the current locale
##
DEFAULT_ZONE_LOCALE="${LANG}"
[ "${DEFAULT_ZONE_LOCAL}"x = ""x ] && DEFAULT_ZONE_LOCALE="C"
## DEFAULT_ZONE_TERMINAL
## default terminal type for the zone
##
DEFAULT_ZONE_TERMINAL="${TERM:-vt100}"
## DEFAULT_ZONE_TIMESERVER
## default timeserver for the zones
##
DEFAULT_ZONE_TIMESERVER="localhost"
## DEFAULT_ZONE_CUSTOMIZE_SCRIPT_SOURCE
## default customize script for the zone
## Possible values for this variabe are:
## "builtin", "none", or the name of an existing script
## The customize script runs inside the new zone
## while first rebooting the zone
##
DEFAULT_ZONE_CUSTOMIZE_SCRIPT_SOURCE="/applications/SunTools/CURRENT/bin/zone_customize_script.sh"
## DEFAULT_ZONE_CUSTOMIZE_SCRIPT_TARGET
## fully qualified name of the customize script inside the zone
##
## Note: The runlevel in which the script runs depends on the path of the
## customize scripts
## The default is rcS.d = multi-user-server
##
DEFAULT_ZONE_CUSTOMIZE_SCRIPT_TARGET="/etc/rcS.d/S99customize_script"
## DEFAULT_ZONE_SMF_PROFILE
## SMF site profile for the zone; default: none
##
DEFAULT_ZONE_SMF_PROFILE=""
## DEFAULT_ZONE_IP_ADDRESS
## there is no default IP address for the zone
##
DEFAULT_ZONE_IP_ADDRESS=""
## DEFAULT_ZONE_IP_STACK
## this can be either SHARED or EXCLUSIVE; the default is SHARED
##
DEFAULT_ZONE_IP_STACK="SHARED"
## DEFAULT_ZONE_NETMASK
## netmask for the zone (only used for zones with exclusive IP stack!)
##
DEFAULT_ZONE_NETMASK=""
## DEFAULT_ZONE_DEFAULT_ROUTER
## default router for the zones
## Note: A default router for a zone can only be configured for zones in Solaris 10 Update 6 and newer
##
DEFAULT_ZONE_DEFAULT_ROUTER=""
# $( netstat -rn | grep "^default" | tr -s " " | cut -f2 -d " " | head -1 )"
## ZONE_GLDV3_CHECK
## Do check the GLDv3 capabiltiy (yes, default) of the network adapter or not (no)
##
DEFAULT_ZONE_GLDV3_CHECK="yes"
## DEFAULT_ZONE_NAME
## there is no default name for the zone
##
DEFAULT_ZONE_NAME=""
## DEFAULT_ZONE_GLOBAL_OPTIONS
## additional global options for the zone
## (e.g. bootargs, pool, limitpriv, etc)
## Please note that the script DOES not check the syntax or semantic for these entries!
##
DEFAULT_ZONE_GLOBAL_OPTIONS=""
## DEFAULT_USE_EXISTING_NAMESERVER_CONFIG
## default nameserver configuration is:
## use the existing nameserver configuration
##
DEFAULT_USE_EXISTING_NAMESERVER_CONFIG=${__TRUE}
## DEFAULT_ZONE_AUTOBOOT
## enable zone autoboot?; default is false
##
DEFAULT_ZONE_AUTOBOOT=${__FALSE}
## DEFAULT_ZONE_NETWORK_INTERFACE
## the default network interface for the zone
## The default is the network interface which hosts the
## network with the IP address for the zone
##
DEFAULT_ZONE_NETWORK_INTERFACE=""
## DEFAULT_BOOT_THE_ZONE_NOW
## boot the zone after installation?
##
DEFAULT_BOOT_THE_ZONE_NOW=${__FALSE}
## DEFAULT_ZONE_MEMORY_LIMIT
## the memory limit for the zone
## There is no default for this keyword
## Note that this configuration is only supported in
## Solaris 10 8/07 and newer!
##
DEFAULT_ZONE_MEMORY_LIMIT=""
## DEFAULT_ZONE_SWAP_LIMIT
## the swap limit for the zone
## There is no default for this keyword
## Note that this configuration is only supported in
## Solaris 10 8/07 and newer!
##
DEFAULT_ZONE_SWAP_LIMIT=""
## DEFAULT_ZONE_CPU_COUNT
## the number of CPUs for the zone
## There is no default for this keyword
## Note that this configuration is only supported in
## Solaris 10 8/07 and newer!
##
DEFAULT_ZONE_CPU_COUNT=""
## DEFAULT_ZONE_CPU_SHARES
## the number of CPU shares for the zone
## There is no default for this keyword
## Note that this configuration is only supported in
## Solaris 10 8/07 and newer!
##
DEFAULT_ZONE_CPU_SHARES=""
## DEFAULT_ZONE_INHERITED_DIRS
## add. directories that should be inherited by the zone
## Note: Directories with space or tabs in the name are NOT supported!
##
DEFAULT_ZONE_INHERITED_DIRS=""
## DEFAULT_ZONE_WRITABLE_DIRS
## directories that should be mounted r/w in the zone
## Format of the entries:
## zone_dir:global_dir
## Note: Directories with space or tabs in the name are NOT supported!
##
DEFAULT_ZONE_WRITABLE_DIRS=""
## DEFAULT_ZONE_READONLY_DIRS
## directories that should be mounted r/o in the zone
## Format of the entries:
## zone_dir:global_dir
## Note: Directories with space or tabs in the name are NOT supported!
##
DEFAULT_ZONE_READONLY_DIRS=""
## DEFAULT_ZONE_DATASETS
## ZFS datasets for the zone
##
DEFAULT_ZONE_DATASETS=""
## DEFAULT_ZONE_DEVICES
##
DEFAULT_ZONE_DEVICES=""
## DEFAULT_EDIT_ZONE_CONFIG
## edit the zone configuration before creating the zone
## after exiting the editor the user can choose to continue
## or to abort the zone installation
##
DEFAULT_EDIT_ZONE_CONFIG=${__FALSE}
## DEFAULT_ZONE_TEMPLATE_DIRS
## Template directories for the zone; all files and directories in the
## directories listed in this variable are copied to the root dir of the
## zone
if [ -d "${DEFAULT_ZONE_PATH}/template_dir" ] ; then
ZONE_TEMPLATE_DIRS="${DEFAULT_ZONE_PATH}/template_dir"
else
ZONE_TEMPLATE_DIRS=""
fi
## DEFAULT_ZONE_FILES_TO_COPY
## File which should be copied from the global zone to the non-global zone
## The file(s) are copied to the same location in the non-global zone
##
DEFAULT_ZONE_FILES_TO_COPY="
/var/db/var/query_postinstall.conf
/var/db/var/installed_x_services
/etc/ssh/sshd_config
"
## DEFAULT_ZONE_FINISH_SCRIPT
##
## finish script for creating the zone
## This script is called in the global zone after the new
## zone is created and configured but before it is booted
## The parameters for the script are
## - the fully qualified name of the directory for the zone
##
## Note: Please write your finish scripts so that they handle multiple parameter correct
## because there may be additional parameter in a future version of this script!
##
## The finish script must return 0 if everything is okay; everthing else
## is interpreted as error and the zone creation is aborted
##
## Note that you can change the configuration of the zone from within the finish script
## with a few exceptions (e.g. you can NOT add directories to inherit here)
##
## All environment variables beginning with ZONE_ are exported and can be used by the
## finish script. The exported variables are:
##
## ZONE_AUTOBOOT
## ZONE_CLONE_SOURCE
## ZONE_CUSTOMIZE_SCRIPT_CONTENTS
## ZONE_CUSTOMIZE_SCRIPT_SOURCE
## ZONE_CUSTOMIZE_SCRIPT_TARGET
## ZONE_FINISH_SCRIPT
## ZONE_IP_ADDRESS
## ZONE_LOCALE
## ZONE_MODE
## ZONE_NAME
## ZONE_NETWORK_INTERFACE
## ZONE_PATH
## ZONE_ROOT_PASSWORD
## ZONE_SMF_PROFILE
## ZONE_TERMINAL
## ZONE_TIMESERVER
## ZONE_TZ
## ZONE_IP_STACK
## ZONE_NETMASK
## ZONE_DEFAULT_ROUTER
## ZONE_MEMORY_LIMIT
## ZONE_SWAP_LIMIT
## ZONE_CPU_COUNT
## ZONE_CPU_SHARES
## ZONE_INHERITED_DIRS
## ZONE_WRITABLE_DIRS
## ZONE_READONLY_DIRS
## ZONE_DATASETS
## ZONE_GLDV3_CHECK
## ZONE_GLOBAL_OPTIONS
## ZONE_DEVICES
## ZONE_TEMPLATE_DIRS
## ZONE_FILES_TO_COPY
##
##
DEFAULT_ZONE_FINISH_SCRIPT=""
## DEFAULT_ZONE_CUSTOMIZE_SCRIPT_CONTENTS
## builtin customize script for the zones
## The customize script runs inside the new zone while first
## booting the zone
##
DEFAULT_ZONE_CUSTOMIZE_SCRIPT_CONTENTS="
echo \"Customization of the zone is running ...\"
echo \"Disabling sendmail ...\"
svcadm disable sendmail
svcadm disable svc:/application/cde-printinfo:default
echo \" ... customization done. Removing the customize script\"
rm \$0
"
# only change the following variables if you know what you are doing #
ZONE_CONFIG_FILE="/etc/create_zone.cfg"
# no further internal variables defined yet
#
# Note you can redefine any variable that is initialized before calling
# ReadConfigFile here!