xref: /titanic_50/usr/src/lib/libbrand/dtd/brand.dtd.1 (revision bafd1f1462c49949e0251d74b4fbfa24d29bc79a)
19acbbeafSnn35248<?xml version='1.0' encoding='UTF-8' ?>
29acbbeafSnn35248
39acbbeafSnn35248<!--
49acbbeafSnn35248 CDDL HEADER START
59acbbeafSnn35248
69acbbeafSnn35248 The contents of this file are subject to the terms of the
79acbbeafSnn35248 Common Development and Distribution License (the "License").
89acbbeafSnn35248 You may not use this file except in compliance with the License.
99acbbeafSnn35248
109acbbeafSnn35248 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
119acbbeafSnn35248 or http://www.opensolaris.org/os/licensing.
129acbbeafSnn35248 See the License for the specific language governing permissions
139acbbeafSnn35248 and limitations under the License.
149acbbeafSnn35248
159acbbeafSnn35248 When distributing Covered Code, include this CDDL HEADER in each
169acbbeafSnn35248 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
179acbbeafSnn35248 If applicable, add the following below this CDDL HEADER, with the
189acbbeafSnn35248 fields enclosed by brackets "[]" replaced with your own identifying
199acbbeafSnn35248 information: Portions Copyright [yyyy] [name of copyright owner]
209acbbeafSnn35248
219acbbeafSnn35248 CDDL HEADER END
229acbbeafSnn35248
23a20ee416SGlenn Faden Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
24*bafd1f14SJerry Jelinek Copyright (c) 2011, Joyent, Inc. All rights reserved.
259acbbeafSnn35248
269acbbeafSnn35248 DO NOT EDIT THIS FILE.
273c7284bdSAlexander Eremin
283c7284bdSAlexander Eremin Copyright 2014 Nexenta Systems, Inc. All rights reserved.
299acbbeafSnn35248-->
309acbbeafSnn35248
319acbbeafSnn35248<!--
329acbbeafSnn35248  verify_cfg
339acbbeafSnn35248
349acbbeafSnn35248    Identifies the program to be invoked by zonecfg to verify that the
359acbbeafSnn35248    zone's configuration is legal, and that all the configured devices,
369acbbeafSnn35248    attributes, etc. are legal for this brand.
379acbbeafSnn35248
389acbbeafSnn35248    The program is called with a single argument: the path to a file
399acbbeafSnn35248    containing a temporary config.xml file the zone.  It should return 0
409acbbeafSnn35248    on success and non-0 on failure.  Any detailed error messages should be
419acbbeafSnn35248    displayed to stderr.
429acbbeafSnn35248
439acbbeafSnn35248    It has no attributes.
449acbbeafSnn35248
459acbbeafSnn35248-->
469acbbeafSnn35248<!ELEMENT verify_cfg	(#PCDATA) >
479acbbeafSnn35248<!ATTLIST verify_cfg>
489acbbeafSnn35248<!--
499acbbeafSnn35248  verify_adm
509acbbeafSnn35248
519acbbeafSnn35248    Identifies the program invoked by zoneadm to perform brand-specific
529acbbeafSnn35248    checks as to the viability of a zone on this specific machine.
539acbbeafSnn35248
549acbbeafSnn35248    The following replacements are performed:
559acbbeafSnn35248
569acbbeafSnn35248      %z	Name of zone
57ff17c8bfSgjelinek      %R	Zonepath of zone
58ff17c8bfSgjelinek      Additional arguments, if any, are appended.
599acbbeafSnn35248
609acbbeafSnn35248    The program should return 0 on success and non-0 on failure.  Any
619acbbeafSnn35248    detailed error messages should be displayed to stderr.
629acbbeafSnn35248
639acbbeafSnn35248    It has no attributes.
649acbbeafSnn35248
659acbbeafSnn35248-->
669acbbeafSnn35248<!ELEMENT verify_adm	(#PCDATA) >
679acbbeafSnn35248<!ATTLIST verify_adm>
689acbbeafSnn35248
699acbbeafSnn35248<!--
709acbbeafSnn35248  install
719acbbeafSnn35248
729acbbeafSnn35248    Identifies the program to invoke when installing a zone.  The following
739acbbeafSnn35248    replacements are performed:
749acbbeafSnn35248
759acbbeafSnn35248      %z	Name of zone
76ff17c8bfSgjelinek      %R	Zonepath of zone
77ff17c8bfSgjelinek      Additional arguments, if any, are appended.
789acbbeafSnn35248
799acbbeafSnn35248    It has no attributes.
809acbbeafSnn35248-->
819acbbeafSnn35248<!ELEMENT install	(#PCDATA) >
829acbbeafSnn35248<!ATTLIST install>
839acbbeafSnn35248
849acbbeafSnn35248<!--
859acbbeafSnn35248  installopts
869acbbeafSnn35248
879acbbeafSnn35248    Identifies the command-line options supported by the brand's
889acbbeafSnn35248    installation program, allowing zoneadm to parse the install line
899acbbeafSnn35248    properly.
909acbbeafSnn35248
919acbbeafSnn35248    It has no attributes.
929acbbeafSnn35248-->
939acbbeafSnn35248<!ELEMENT installopts	(#PCDATA) >
949acbbeafSnn35248<!ATTLIST installopts>
959acbbeafSnn35248
969acbbeafSnn35248<!--
979acbbeafSnn35248  boot
989acbbeafSnn35248
999acbbeafSnn35248    This is a program which gets run by zoneadmd when a zone is booted.
1009acbbeafSnn35248    The program will be invoked as the last step in the zone booting
1019acbbeafSnn35248    process before the the first process is spawned inside the zone.
1029acbbeafSnn35248
1039acbbeafSnn35248    If this programs succeeds it should not generate any output.
1049acbbeafSnn35248    If this program returns an error, any output generated by the
1059acbbeafSnn35248    program will be sent to the zoneadmd message log.
1069acbbeafSnn35248
1079acbbeafSnn35248    The following replacements are performed:
1089acbbeafSnn35248
1099acbbeafSnn35248      %z	Name of zone
110ff17c8bfSgjelinek      %R	Zonepath of zone
111ff17c8bfSgjelinek      Additional arguments, if any, are appended.
1129acbbeafSnn35248
1139acbbeafSnn35248    It has no attributes.
1149acbbeafSnn35248-->
1159acbbeafSnn35248<!ELEMENT boot	(#PCDATA) >
1169acbbeafSnn35248<!ATTLIST boot>
1179acbbeafSnn35248
1189acbbeafSnn35248<!--
119fbbfbc6eSjv227347  sysboot
120fbbfbc6eSjv227347
121fbbfbc6eSjv227347    This is a program that will be run by zoneadm during system boot for an
122fbbfbc6eSjv227347    installed zone that won't automatically boot.
123fbbfbc6eSjv227347
124fbbfbc6eSjv227347    If the program succeeds, then it should not generate output.
125fbbfbc6eSjv227347    If the program returns an error, then the output it generates will be
126fbbfbc6eSjv227347    sent to the zones SMF service's message log.
127fbbfbc6eSjv227347
128fbbfbc6eSjv227347    The following replacements are performed:
129fbbfbc6eSjv227347
130fbbfbc6eSjv227347      %z	Name of the target zone
131fbbfbc6eSjv227347      %R	Zonepath of the target zone
132fbbfbc6eSjv227347      Additional arguments, if any, are appended.
133fbbfbc6eSjv227347
134fbbfbc6eSjv227347    This element has no attributes.
135fbbfbc6eSjv227347-->
136fbbfbc6eSjv227347<!ELEMENT sysboot	(#PCDATA) >
137fbbfbc6eSjv227347<!ATTLIST sysboot>
138fbbfbc6eSjv227347
139fbbfbc6eSjv227347<!--
1409acbbeafSnn35248  halt
1419acbbeafSnn35248
1429acbbeafSnn35248    This is a program which gets run by zoneadmd when a zone is being
1439acbbeafSnn35248    halted.  This callback is provided to allow a brand to cleanup any
1449acbbeafSnn35248    special configuration that was setup during boot.
1459acbbeafSnn35248
1469acbbeafSnn35248    This program will also be invoked by zoneadmd if any part of the zone
1479acbbeafSnn35248    booting process fail, even if the booting process failed before the
1489acbbeafSnn35248    brand boot program was invoked.  It is also possible that if the zone
1499acbbeafSnn35248    fails to halt after invoking this program, future attempts to halt the
1509acbbeafSnn35248    zone will invoke this program again.  So this program should be
1519acbbeafSnn35248    designed to clean up any resources allocated to a zone but it should
1529acbbeafSnn35248    also be able to gracefully handle the case where resources that it
1539acbbeafSnn35248    expects to release are not actually allocated (or have been already
1549acbbeafSnn35248    released.)
1559acbbeafSnn35248
1569acbbeafSnn35248    If this programs succeeds it should not generate any output.  If this
1579acbbeafSnn35248    program returns an error, any output generated by the program will be
1589acbbeafSnn35248    sent to the zoneadmd message log.
1599acbbeafSnn35248
1609acbbeafSnn35248    The following replacements are performed:
1619acbbeafSnn35248
1629acbbeafSnn35248      %z	Name of zone
163ff17c8bfSgjelinek      %R	Zonepath of zone
164ff17c8bfSgjelinek      Additional arguments, if any, are appended.
1659acbbeafSnn35248
1669acbbeafSnn35248    It has no attributes.
1679acbbeafSnn35248-->
1689acbbeafSnn35248<!ELEMENT halt	(#PCDATA) >
1699acbbeafSnn35248<!ATTLIST halt>
1709acbbeafSnn35248
1719acbbeafSnn35248<!--
1723c7284bdSAlexander Eremin  shutdown
1733c7284bdSAlexander Eremin
1743c7284bdSAlexander Eremin    This is a program which gets run by zoneadmd when a zone is being
1753c7284bdSAlexander Eremin    shutdown gracefully. Currently only asynchronous mode is supported.
1763c7284bdSAlexander Eremin
1773c7284bdSAlexander Eremin    If this program succeeds it should not generate any output. If this
1783c7284bdSAlexander Eremin    program returns an error, any output generated by the program will be
1793c7284bdSAlexander Eremin    sent to the zoneadmd message log.
1803c7284bdSAlexander Eremin
1813c7284bdSAlexander Eremin    The following replacements are performed:
1823c7284bdSAlexander Eremin
1833c7284bdSAlexander Eremin      %z	Name of zone
1843c7284bdSAlexander Eremin      %R	Zonepath of zone
1853c7284bdSAlexander Eremin      Additional arguments, if any, are appended.
1863c7284bdSAlexander Eremin
1873c7284bdSAlexander Eremin    It has no attributes.
1883c7284bdSAlexander Eremin-->
1893c7284bdSAlexander Eremin<!ELEMENT shutdown	(#PCDATA) >
1903c7284bdSAlexander Eremin<!ATTLIST shutdown>
1913c7284bdSAlexander Eremin
1923c7284bdSAlexander Eremin<!--
1939acbbeafSnn35248  modname
1949acbbeafSnn35248
1959acbbeafSnn35248    Path to the kernel module that implements the kernel-level
1969acbbeafSnn35248    functionality of the brand.
1979acbbeafSnn35248
1989acbbeafSnn35248    It has no attributes.
1999acbbeafSnn35248-->
2009acbbeafSnn35248<!ELEMENT modname	(#PCDATA) >
2019acbbeafSnn35248<!ATTLIST modname>
2029acbbeafSnn35248
2039acbbeafSnn35248<!--
2049acbbeafSnn35248  initname
2059acbbeafSnn35248
2069acbbeafSnn35248    Path to the initial executable that should be launched when booting a
2079acbbeafSnn35248    branded zone.
2089acbbeafSnn35248
2099acbbeafSnn35248    It has no attributes.
2109acbbeafSnn35248-->
2119acbbeafSnn35248<!ELEMENT initname	(#PCDATA) >
2129acbbeafSnn35248<!ATTLIST initname>
2139acbbeafSnn35248
2149acbbeafSnn35248<!--
215*bafd1f14SJerry Jelinek  restartinit
216*bafd1f14SJerry Jelinek
217*bafd1f14SJerry Jelinek    Boolean indicating that the program specified by the initname attr
218*bafd1f14SJerry Jelinek    should be restarted, or not, if it exits.  By default, the init program
219*bafd1f14SJerry Jelinek    will be restarted if this attribute is not provided.  Specifying false
220*bafd1f14SJerry Jelinek    for this attr will prevent that.
221*bafd1f14SJerry Jelinek
222*bafd1f14SJerry Jelinek    It has no attributes.
223*bafd1f14SJerry Jelinek-->
224*bafd1f14SJerry Jelinek<!ELEMENT restartinit	(#PCDATA) >
225*bafd1f14SJerry Jelinek<!ATTLIST restartinit>
226*bafd1f14SJerry Jelinek
227*bafd1f14SJerry Jelinek<!--
2289acbbeafSnn35248  login_cmd
2299acbbeafSnn35248
2309acbbeafSnn35248    Path to the initial login binary that should be executed when
2319acbbeafSnn35248    attempting to zlogin into a branded zone.
2329acbbeafSnn35248
2339acbbeafSnn35248    The following replacements are performed:
2349acbbeafSnn35248
2359acbbeafSnn35248      %Z	Name of the current zone
2369acbbeafSnn35248      %u	User login name
2379acbbeafSnn35248
2389acbbeafSnn35248    It has no attributes.
2399acbbeafSnn35248-->
2409acbbeafSnn35248<!ELEMENT login_cmd	(#PCDATA) >
2419acbbeafSnn35248<!ATTLIST login_cmd>
2429acbbeafSnn35248
2439acbbeafSnn35248<!--
244cb8a054bSGlenn Faden  forcedlogin_cmd
245cb8a054bSGlenn Faden
246cb8a054bSGlenn Faden    Path to the initial login binary that should be executed when
247cb8a054bSGlenn Faden    attempting to zlogin into a branded zone without authentication.
248cb8a054bSGlenn Faden
249cb8a054bSGlenn Faden    The following replacements are performed:
250cb8a054bSGlenn Faden
251cb8a054bSGlenn Faden      %Z	Name of the current zone
252cb8a054bSGlenn Faden      %u	User login name
253cb8a054bSGlenn Faden
254cb8a054bSGlenn Faden    It has no attributes.
255cb8a054bSGlenn Faden-->
256cb8a054bSGlenn Faden<!ELEMENT forcedlogin_cmd	(#PCDATA) >
257cb8a054bSGlenn Faden<!ATTLIST forcedlogin_cmd>
258cb8a054bSGlenn Faden
259cb8a054bSGlenn Faden<!--
260858a4b99Ssl108498  user_cmd
261858a4b99Ssl108498
262858a4b99Ssl108498    Path to the binary that will translate a user name to a passwd(4) entry.
263858a4b99Ssl108498
264858a4b99Ssl108498    The following replacements are performed:
265858a4b99Ssl108498
266858a4b99Ssl108498      %u        User login name
267858a4b99Ssl108498
268858a4b99Ssl108498    It has no attributes.  The passwd(4) entry is used to determine $LOGNAME,
269858a4b99Ssl108498    $HOME, and $SHELL for non-interactive "zlogin -l <user> <cmd>".
270858a4b99Ssl108498-->
271858a4b99Ssl108498<!ELEMENT user_cmd   (#PCDATA) >
272858a4b99Ssl108498<!ATTLIST user_cmd>
273858a4b99Ssl108498
274858a4b99Ssl108498<!--
275ff17c8bfSgjelinek  attach
27637774979Sgjelinek
277ff17c8bfSgjelinek    Path to a hook that will perform any necessary processing on
278ff17c8bfSgjelinek    a zone to allow it to be attached.  The zone will be in the "configured"
279ff17c8bfSgjelinek    state when this hook is run.  This hook is never called when the zone
280ff17c8bfSgjelinek    is "force attached" (-F).
28137774979Sgjelinek
282ff17c8bfSgjelinek    If this hook exits with a non-zero exit status, the attach operation
28337774979Sgjelinek    will fail.
28437774979Sgjelinek
28537774979Sgjelinek    The following replacements are performed:
28637774979Sgjelinek
28737774979Sgjelinek      %z	Name of zone
288ff17c8bfSgjelinek      %R	Zonepath of zone
289ff17c8bfSgjelinek      Additional arguments, if any, are appended.
290ff17c8bfSgjelinek
291ff17c8bfSgjelinek    If no hook is provided, the internal zoneadm attach code will be used.
292ff17c8bfSgjelinek
293ff17c8bfSgjelinek    It has no attributes.
294ff17c8bfSgjelinek-->
295ff17c8bfSgjelinek<!ELEMENT attach	(#PCDATA) >
296ff17c8bfSgjelinek<!ATTLIST attach>
297ff17c8bfSgjelinek
298ff17c8bfSgjelinek<!--
299ff17c8bfSgjelinek  postattach
300ff17c8bfSgjelinek
301ff17c8bfSgjelinek    Path to a hook that will perform any necessary post-processing on
302ff17c8bfSgjelinek    a zone after it has been attached.  The zone will be in the "installed"
303ff17c8bfSgjelinek    state when this hook is run.  This hook is never called when the zone
304ff17c8bfSgjelinek    is "force attached" (-F).
305ff17c8bfSgjelinek
306ff17c8bfSgjelinek    If this hook exits with a non-zero exit status, the attach operation
307ff17c8bfSgjelinek    will fail and the zone state will be reset to "configured".
308ff17c8bfSgjelinek
309ff17c8bfSgjelinek    The following replacements are performed:
310ff17c8bfSgjelinek
311ff17c8bfSgjelinek      %z	Name of zone
312ff17c8bfSgjelinek      %R	Zonepath of zone
313ff17c8bfSgjelinek      Additional arguments, if any, are appended.
31437774979Sgjelinek
31537774979Sgjelinek    It has no attributes.
31637774979Sgjelinek-->
31737774979Sgjelinek<!ELEMENT postattach	(#PCDATA) >
31837774979Sgjelinek<!ATTLIST postattach>
31937774979Sgjelinek
32037774979Sgjelinek<!--
3219acbbeafSnn35248  postclone
3229acbbeafSnn35248
323ff17c8bfSgjelinek    Path to a hook that will perform any necessary post-processing on
324ff17c8bfSgjelinek    a zone after it has been cloned.  The zone will be in the "incomplete"
325ff17c8bfSgjelinek    state when this hook is run.
326ff17c8bfSgjelinek
327ff17c8bfSgjelinek    If this hook exits with a non-zero exit status, the clone operation
328ff17c8bfSgjelinek    will fail and the zone will be left in the "incomplete" state,
329ff17c8bfSgjelinek    otherwise the state will be changed to the "installed" state.
3309acbbeafSnn35248
3319acbbeafSnn35248    The following replacements are performed:
3329acbbeafSnn35248
3339acbbeafSnn35248      %z	Name of zone
334ff17c8bfSgjelinek      %R	Zonepath of zone
335ff17c8bfSgjelinek      Additional arguments, if any, are appended.
3369acbbeafSnn35248
3379acbbeafSnn35248    It has no attributes.
3389acbbeafSnn35248-->
3399acbbeafSnn35248<!ELEMENT postclone	(#PCDATA) >
3409acbbeafSnn35248<!ATTLIST postclone>
3419acbbeafSnn35248
3429acbbeafSnn35248<!--
3431100f00dSgjelinek  postinstall
3441100f00dSgjelinek
3451100f00dSgjelinek    Path to a script that will perform any necessary post-processing on
3461100f00dSgjelinek    a zone after it has been freshly installed.  This hook will run after the
3471100f00dSgjelinek    install hook completes and the zone is in the installed state.  The
3481100f00dSgjelinek    additional arguments are the same as what is passed to the install hook.
3491100f00dSgjelinek
3501100f00dSgjelinek    The following replacements are performed:
3511100f00dSgjelinek
3521100f00dSgjelinek      %z	Name of zone
353ff17c8bfSgjelinek      %R	Zonepath of zone
354ff17c8bfSgjelinek      Additional arguments, if any, are appended.
3551100f00dSgjelinek
3561100f00dSgjelinek    It has no attributes.
3571100f00dSgjelinek-->
3581100f00dSgjelinek<!ELEMENT postinstall	(#PCDATA) >
3591100f00dSgjelinek<!ATTLIST postinstall>
3601100f00dSgjelinek
3611100f00dSgjelinek<!--
36237774979Sgjelinek  predetach
36337774979Sgjelinek
364ff17c8bfSgjelinek    Path to a hook that will perform any necessary pre-processing on
365ff17c8bfSgjelinek    a zone before it is detached.  The zone will be in the "installed"
366ff17c8bfSgjelinek    state when this hook is run.
36737774979Sgjelinek
36837774979Sgjelinek    It is possible that if the zone fails to detach after invoking this
369ff17c8bfSgjelinek    hook, future attempts to detach the zone will invoke this hook again.
370ff17c8bfSgjelinek    So this hook should be designed to gracefully handle the case where
371ff17c8bfSgjelinek    it is run multiple times on the same zone.  If this hook exits with
37237774979Sgjelinek    a non-zero exit status, the detach operation will fail.
37337774979Sgjelinek
374ff17c8bfSgjelinek    This hook is most commonly used when there is pre-processing for detaching
375ff17c8bfSgjelinek    a zone but the built-in detach support will be used for the actual
376ff17c8bfSgjelinek    detach.  Otherwise, if a detach hook is provided, then it can be used
377ff17c8bfSgjelinek    to do both preprocessing as well as the actual detach.
378ff17c8bfSgjelinek
37937774979Sgjelinek    The following replacements are performed:
38037774979Sgjelinek
38137774979Sgjelinek      %z	Name of zone
382ff17c8bfSgjelinek      %R	Zonepath of zone
383ff17c8bfSgjelinek      Additional arguments, if any, are appended.
38437774979Sgjelinek
38537774979Sgjelinek    It has no attributes.
38637774979Sgjelinek-->
38737774979Sgjelinek<!ELEMENT predetach	(#PCDATA) >
38837774979Sgjelinek<!ATTLIST predetach>
38937774979Sgjelinek
39037774979Sgjelinek<!--
391ff17c8bfSgjelinek  detach
392ff17c8bfSgjelinek
393ff17c8bfSgjelinek    Path to a hook that will perform any necessary processing on
394ff17c8bfSgjelinek    a zone to allow it to be detached.  The zone will be in the "installed"
395ff17c8bfSgjelinek    state when this hook is run.
396ff17c8bfSgjelinek
397ff17c8bfSgjelinek    It is possible that if the zone fails to detach while running this
398ff17c8bfSgjelinek    hook, future attempts to detach the zone will invoke this hook again.
399ff17c8bfSgjelinek    So this hook should be designed to gracefully handle the case where
400ff17c8bfSgjelinek    it is run multiple times on the same zone.  If this hook exits with
401ff17c8bfSgjelinek    a non-zero exit status, the detach operation will fail and the zone will
402ff17c8bfSgjelinek    be left in the "installed" state, otherwise the state will be changed
403ff17c8bfSgjelinek    to "configured".
404ff17c8bfSgjelinek
405ff17c8bfSgjelinek    The following replacements are performed:
406ff17c8bfSgjelinek
407ff17c8bfSgjelinek      %z	Name of zone
408ff17c8bfSgjelinek      %R	Zonepath of zone
409ff17c8bfSgjelinek      Additional arguments, if any, are appended.
410ff17c8bfSgjelinek
411ff17c8bfSgjelinek    If no hook is provided, the internal zoneadm detach code will be used.
412ff17c8bfSgjelinek
413ff17c8bfSgjelinek    It has no attributes.
414ff17c8bfSgjelinek-->
415ff17c8bfSgjelinek<!ELEMENT detach	(#PCDATA) >
416ff17c8bfSgjelinek<!ATTLIST detach>
417ff17c8bfSgjelinek
418ff17c8bfSgjelinek<!--
419ff17c8bfSgjelinek  clone
420ff17c8bfSgjelinek    Path to a hook that will perform any necessary processing on a zone to
421ff17c8bfSgjelinek    allow it to be installed via cloning.  Cloning is an alternative to
422ff17c8bfSgjelinek    installing so this hook should result in the same effect for the zone.
423ff17c8bfSgjelinek    The zone will be in the "incomplete" state when this hook is run.
424ff17c8bfSgjelinek
425ff17c8bfSgjelinek    If this hook exits with a non-zero exit status, the clone operation
426ff17c8bfSgjelinek    will fail and the zone will be left in the "incomplete" state, otherwise
427ff17c8bfSgjelinek    the state will be changed to "installed".
428ff17c8bfSgjelinek
429ff17c8bfSgjelinek    The following replacements are performed:
430ff17c8bfSgjelinek
431ff17c8bfSgjelinek      %z	Name of zone
432ff17c8bfSgjelinek      %R	Zonepath of zone
433ff17c8bfSgjelinek      1st arg   name of source zone
434ff17c8bfSgjelinek      Additional arguments, if any, are appended.
435ff17c8bfSgjelinek
436ff17c8bfSgjelinek    If no hook is provided, the internal zoneadm cloning code will be used.
437ff17c8bfSgjelinek-->
438ff17c8bfSgjelinek<!ELEMENT clone	(#PCDATA) >
439ff17c8bfSgjelinek<!ATTLIST clone>
440ff17c8bfSgjelinek
441ff17c8bfSgjelinek<!--
44237774979Sgjelinek  preuninstall
44337774979Sgjelinek
44437774979Sgjelinek    Path to a script that will perform any necessary pre-processing on
445ff17c8bfSgjelinek    a zone before it is uninstalled.  The zone will be in the "installed"
446ff17c8bfSgjelinek    state when this hook is run.
44737774979Sgjelinek
44837774979Sgjelinek    It is possible that if the zone fails to uninstall after invoking this
449ff17c8bfSgjelinek    hook, future attempts to uninstall the zone will invoke this hook
450ff17c8bfSgjelinek    again.  So this hook should be designed to gracefully handle the case
451ff17c8bfSgjelinek    where it is run multiple times on the same zone.  If this hook exits
45237774979Sgjelinek    with a non-zero exit status, the uninstall operation will fail.
45337774979Sgjelinek
45437774979Sgjelinek    The following replacements are performed:
45537774979Sgjelinek
45637774979Sgjelinek      %z	Name of zone
457ff17c8bfSgjelinek      %R	Zonepath of zone
458ff17c8bfSgjelinek      Additional arguments, if any, are appended.
45937774979Sgjelinek
46037774979Sgjelinek    It has no attributes.
46137774979Sgjelinek-->
46237774979Sgjelinek<!ELEMENT preuninstall	(#PCDATA) >
46337774979Sgjelinek<!ATTLIST preuninstall>
46437774979Sgjelinek
46537774979Sgjelinek<!--
466ff17c8bfSgjelinek  uninstall
467ff17c8bfSgjelinek    Identifies the hook to invoke when uninstalling a zone.  The zone will
468ff17c8bfSgjelinek    be in the "incomplete" state when this hook is run.
469ff17c8bfSgjelinek
470ff17c8bfSgjelinek    If this hook exits with a non-zero exit status, the uninstall operation
471ff17c8bfSgjelinek    will fail and the zone will be left in the "incomplete" state, otherwise
472ff17c8bfSgjelinek    the state will be changed to "configured".
473ff17c8bfSgjelinek
474ff17c8bfSgjelinek    The following replacements are performed:
475ff17c8bfSgjelinek
476ff17c8bfSgjelinek      %z	Name of zone
477ff17c8bfSgjelinek      %R	Zonepath of zone
478ff17c8bfSgjelinek      Additional arguments, if any, are appended.
479ff17c8bfSgjelinek
480ff17c8bfSgjelinek    If no hook is provided, the internal zoneadm uninstall code will be used.
481ff17c8bfSgjelinek-->
482ff17c8bfSgjelinek<!ELEMENT uninstall	(#PCDATA) >
483ff17c8bfSgjelinek<!ATTLIST uninstall>
484ff17c8bfSgjelinek
485ff17c8bfSgjelinek<!--
486ff17c8bfSgjelinek  presnap
487ff17c8bfSgjelinek    Identifies the hook to invoke before snapshotting a zone using the
488ff17c8bfSgjelinek    built-in ZFS clone support.
489ff17c8bfSgjelinek
490ff17c8bfSgjelinek    If this hook exits with a non-zero exit status, the snapshot operation
491ff17c8bfSgjelinek    will fail and the zfs clone operation will fail.
492ff17c8bfSgjelinek
493ff17c8bfSgjelinek    The following replacements are performed:
494ff17c8bfSgjelinek
495ff17c8bfSgjelinek      %z	Name of zone
496ff17c8bfSgjelinek      %R	Zonepath of zone
497ff17c8bfSgjelinek-->
498ff17c8bfSgjelinek<!ELEMENT presnap	(#PCDATA) >
499ff17c8bfSgjelinek<!ATTLIST presnap>
500ff17c8bfSgjelinek
501ff17c8bfSgjelinek<!--
502ff17c8bfSgjelinek  postsnap
503ff17c8bfSgjelinek    Identifies the hook to invoke after snapshotting a zone using the
504ff17c8bfSgjelinek    built-in ZFS clone support.
505ff17c8bfSgjelinek
506ff17c8bfSgjelinek    If this hook exits with a non-zero exit status, the zfs clone operation
507ff17c8bfSgjelinek    will fail.
508ff17c8bfSgjelinek
509ff17c8bfSgjelinek    The following replacements are performed:
510ff17c8bfSgjelinek
511ff17c8bfSgjelinek      %z	Name of zone
512ff17c8bfSgjelinek      %R	Zonepath of zone
513ff17c8bfSgjelinek-->
514ff17c8bfSgjelinek<!ELEMENT postsnap	(#PCDATA) >
515ff17c8bfSgjelinek<!ATTLIST postsnap>
516ff17c8bfSgjelinek
517ff17c8bfSgjelinek<!--
518ff17c8bfSgjelinek  validatesnap
519ff17c8bfSgjelinek    Identifies the hook to invoke to validate a snapshot of a zone using the
520ff17c8bfSgjelinek    built-in ZFS clone support.  This will validate a snapshot that was
521ff17c8bfSgjelinek    explicitly specified to the clone command when the user wants to
522ff17c8bfSgjelinek    re-use a snapshot from an earlier clone operation.
523ff17c8bfSgjelinek
524ff17c8bfSgjelinek    If this hook exits with a non-zero exit status, the snapshot validation
525ff17c8bfSgjelinek    operation will fail, meaning the zfs snapshot cannot be used to install
526ff17c8bfSgjelinek    the zone.
527ff17c8bfSgjelinek
528ff17c8bfSgjelinek    The following replacements are performed:
529ff17c8bfSgjelinek
530ff17c8bfSgjelinek      %z	Name of zone
531ff17c8bfSgjelinek      %R	Zonepath of zone
532ff17c8bfSgjelinek      1st arg   snapshot name
533ff17c8bfSgjelinek      2nd arg   snapshot path
534ff17c8bfSgjelinek-->
535ff17c8bfSgjelinek<!ELEMENT validatesnap	(#PCDATA) >
536ff17c8bfSgjelinek<!ATTLIST validatesnap>
537ff17c8bfSgjelinek
538ff17c8bfSgjelinek<!--
539c5cd6260S  prestatechange
540c5cd6260S    Identifies the hook to invoke before zoneadmd makes a state change.
541c5cd6260S    If this hook exits with a non-zero exit status, the action failed
542c5cd6260S    and no further state change activity will take place.
543c5cd6260S
544c5cd6260S    The following replacements are performed:
545c5cd6260S
546c5cd6260S      %z	Name of zone
547c5cd6260S      %R	Zonepath of zone
548c5cd6260S      1st arg   integer representing current state of zone
549c5cd6260S			2 - installed
550c5cd6260S			3 - ready
551c5cd6260S			4 - running
552c5cd6260S			5 - shutting down
553c5cd6260S			6 - down
554c5cd6260S			7 - mounted
555c5cd6260S      2nd arg   integer representing transition command
556c5cd6260S			0 - ready
557c5cd6260S			1 - boot
558c5cd6260S			4 - halt
5592a8b76b2SSusan Kamm-Worrell      3rd arg   Alternate root (zonepath is mounted under this root)
5602a8b76b2SSusan Kamm-Worrell			empty string if zone not mounted under alternate root
561c5cd6260S-->
562c5cd6260S<!ELEMENT prestatechange	(#PCDATA) >
563c5cd6260S<!ATTLIST prestatechange>
564c5cd6260S
565c5cd6260S<!--
566c5cd6260S  poststatechange
567c5cd6260S    Identifies the hook to invoke after zoneadmd makes a successful state
568c5cd6260S    change.  If this hook exits with a non-zero exit status, the action failed
569c5cd6260S    and zoneadmd treats the overall state change as failed, although
570c5cd6260S    all of the actions up to running the hook will have taken place.
571c5cd6260S
572c5cd6260S    The following replacements are performed:
573c5cd6260S
574c5cd6260S      %z	Name of zone
575c5cd6260S      %R	Zonepath of zone
5762a8b76b2SSusan Kamm-Worrell    See prestatechange comment for 1st, 2nd and 3rd argument values.
577c5cd6260S-->
578c5cd6260S<!ELEMENT poststatechange	(#PCDATA) >
579c5cd6260S<!ATTLIST poststatechange>
580c5cd6260S
581c5cd6260S<!--
582c5cd6260S  query
583c5cd6260S    Identifies a hook which can be called to get brand-specific information
584c5cd6260S    about the zone.  There is no specific place in zones where this is called,
585c5cd6260S    calls within the zone infrastructure can be added as needed.
586c5cd6260S
587c5cd6260S    One example of the use of this hook is to query the implicit ZFS datasets
588c5cd6260S    supported by the brand.
589c5cd6260S
590c5cd6260S    If this hook exits with a non-zero exit status, the query failed,
591c5cd6260S    although in general, this hook shouldn't return non-zero.
592c5cd6260S
593c5cd6260S    The following replacements are performed:
594c5cd6260S
595c5cd6260S      %z	Name of zone
596c5cd6260S      %R	Zonepath of zone
597c5cd6260S      1st arg   Arbitrary string which the hook can use to determine what
598c5cd6260S		data to return.  Brands implementing this hook should be
599c5cd6260S		tolerant of arguments they don't support and simply do
600c5cd6260S		nothing.
601c5cd6260S-->
602c5cd6260S<!ELEMENT query	(#PCDATA) >
603c5cd6260S<!ATTLIST query>
604c5cd6260S
605c5cd6260S<!--
6069acbbeafSnn35248  privilege
6079acbbeafSnn35248
6089acbbeafSnn35248    Add a privilege to the default, prohibited, or required set for all
609bf1d7e28Sdh155122    zones of this brand with ip-type matched.  If a privilege is added
610bf1d7e28Sdh155122    to the default set all zones of this brand with ip-type matched on
611bf1d7e28Sdh155122    the system will inherit this privilege unless the privilege is
612bf1d7e28Sdh155122    removed via limitpriv in zonecfg(1m).  If a privilege is added to
613bf1d7e28Sdh155122    the prohibited set it can not be added to any zones with ip-type
614bf1d7e28Sdh155122    matched via limitpriv in zonecfg(1m).  If a privilege is added to
615bf1d7e28Sdh155122    the required set then all zones of this brand with ip-type matched
616bf1d7e28Sdh155122    on the system will inherit this privilege and it can't be removed via
617bf1d7e28Sdh155122    limitpriv in zonecfg(1m).
6189acbbeafSnn35248
6199acbbeafSnn35248    Its attributes are
6209acbbeafSnn35248      set	The name of the set the privilege should go into.
6219acbbeafSnn35248      name	The name of the privilege.
622bf1d7e28Sdh155122      ip-type	Optional, indicates that adding of the privilege to the
623bf1d7e28Sdh155122		set only applies to certain IP types. Can be "shared" or
624bf1d7e28Sdh155122		"exclusive". If it is not specified, the default value
625bf1d7e28Sdh155122		"all" will be used, which means it is applicable regardless
626bf1d7e28Sdh155122		the IP type.
627bf1d7e28Sdh155122
6289acbbeafSnn35248-->
6299acbbeafSnn35248<!ELEMENT privilege	(#PCDATA) >
6309acbbeafSnn35248<!ATTLIST privilege	set	( default | prohibited | required ) #REQUIRED
631bf1d7e28Sdh155122			name	CDATA #REQUIRED
632bf1d7e28Sdh155122			ip-type ( shared | exclusive ) "all" >
6339acbbeafSnn35248
6349acbbeafSnn35248<!--
6359acbbeafSnn35248  brand
6369acbbeafSnn35248
6379acbbeafSnn35248    The toplevel container for a brand configuration.
6389acbbeafSnn35248
6399acbbeafSnn35248    Its attributes are
6409acbbeafSnn35248
6419acbbeafSnn35248      name	The name of the brand.  This must match the name of the
6429acbbeafSnn35248		directory in which the configuration file is stored.
6439acbbeafSnn35248-->
6449acbbeafSnn35248
645*bafd1f14SJerry Jelinek<!ELEMENT brand		(modname?, initname, restartinit?, login_cmd,
646*bafd1f14SJerry Jelinek			forcedlogin_cmd, user_cmd, install,
6473c7284bdSAlexander Eremin			installopts?, boot?, sysboot?, halt?, shutdown?,
6483c7284bdSAlexander Eremin			verify_cfg?, verify_adm?, postattach?, postclone?,
6493c7284bdSAlexander Eremin			postinstall?, predetach?, attach?, detach?, clone?,
650ff17c8bfSgjelinek			presnap?, postsnap?, validatesnap?,
651c5cd6260S			preuninstall?, uninstall?,
652c5cd6260S			prestatechange?, poststatechange?, query?,
653c5cd6260S			privilege+)>
6549acbbeafSnn35248
6559acbbeafSnn35248<!ATTLIST brand		name		CDATA #REQUIRED>
656