Print this page
14019 Allow more control over zone init exit actions
Portions contributed by: Joshua M. Clulow <jmc@joyent.com>
Portions contributed by: Andy Fiddaman <andy@omnios.org>
Reviewed by: C Fraire <cfraire@me.com>
Reviewed by: Gordon Ross <Gordon.W.Ross@gmail.com>
Approved by: Robert Mustacchi <rm@fingolfin.org>


 175 
 176 <!--
 177   modname
 178 
 179     Path to the kernel module that implements the kernel-level
 180     functionality of the brand.
 181 
 182     It has no attributes.  --> <!ELEMENT modname  (#PCDATA) > <!ATTLIST
 183 modname>
 184 
 185 <!--
 186   initname
 187 
 188     Path to the initial executable that should be launched when booting a
 189     branded zone.
 190 
 191     It has no attributes.  --> <!ELEMENT initname (#PCDATA) > <!ATTLIST
 192 initname>
 193 
 194 <!--
 195   restartinit
 196 
 197     Boolean indicating that the program specified by the initname attr
 198     should be restarted, or not, if it exits.  By default, the init program
 199     will be restarted if this attribute is not provided.  Specifying false
 200     for this attr will prevent that.
 201 
 202     It has no attributes.  --> <!ELEMENT restartinit   (#PCDATA) > <!ATTLIST
 203 restartinit>
 204 




















 205 <!--
 206   login_cmd
 207 
 208     Path to the initial login binary that should be executed when
 209     attempting to zlogin into a branded zone.
 210 
 211     The following replacements are performed:
 212 
 213       %Z  Name of the current zone
 214       %u  User login name
 215 
 216     It has no attributes.  --> <!ELEMENT login_cmd     (#PCDATA) > <!ATTLIST
 217 login_cmd>
 218 
 219 <!--
 220   forcedlogin_cmd
 221 
 222     Path to the initial login binary that should be executed when
 223     attempting to zlogin into a branded zone without authentication.
 224 


 557       ip-type  Optional, indicates that adding of the privilege to the
 558           set only applies to certain IP types. Can be "shared" or
 559           "exclusive". If it is not specified, the default value
 560           "all" will be used, which means it is applicable regardless
 561           the IP type.
 562 
 563 --> <!ELEMENT privilege    (#PCDATA) > <!ATTLIST privilege    set    ( default |
 564 prohibited | required ) #REQUIRED            name CDATA #REQUIRED
 565                ip-type ( shared | exclusive ) "all" >
 566 
 567 <!--
 568   brand
 569 
 570     The toplevel container for a brand configuration.
 571 
 572     Its attributes are
 573 
 574       name     The name of the brand.  This must match the name of the
 575           directory in which the configuration file is stored.  -->
 576 
 577 <!ELEMENT brand               (modname?, initname, restartinit?, login_cmd,

 578                forcedlogin_cmd, user_cmd, install,               installopts?,
 579 boot?, sysboot?, halt?, shutdown?,                verify_cfg?, verify_adm?,
 580 postattach?, postclone?,                postinstall?, predetach?, attach?,
 581 detach?, clone?,              presnap?, postsnap?, validatesnap?,
 582                preuninstall?, uninstall?,              prestatechange?,
 583 poststatechange?, query?,               privilege+)>
 584 
 585 <!ATTLIST brand               name      CDATA #REQUIRED>
 586 
 587 
 588 
 589                                October 25, 2021                             ()


 175 
 176 <!--
 177   modname
 178 
 179     Path to the kernel module that implements the kernel-level
 180     functionality of the brand.
 181 
 182     It has no attributes.  --> <!ELEMENT modname  (#PCDATA) > <!ATTLIST
 183 modname>
 184 
 185 <!--
 186   initname
 187 
 188     Path to the initial executable that should be launched when booting a
 189     branded zone.
 190 
 191     It has no attributes.  --> <!ELEMENT initname (#PCDATA) > <!ATTLIST
 192 initname>
 193 
 194 <!--
 195   restartinit, restartinit0 and restartinitreboot
 196 
 197     These three boolean elements control what action is taken when the
 198     program specified by the 'initname' element exits.


 199 
 200     The default values are:

 201 
 202         restartinit:       true
 203         restartinit0:      false
 204         restartinitreboot: false
 205 
 206     If 'restartinit' is set to false then the init process will never be
 207     restarted and the zone will shut down once init exits. In this case, the
 208     other restartinit elements are ignored.
 209 
 210     When 'restartinit0' is set, init will only be restarted if it exited with
 211     an exit status of 0, otherwise the zone will shut down.
 212 
 213     If 'restartinitreboot' is set to true then whenever init should be
 214     restarted, based on the other restartinit elements, the zone will instead
 215     be rebooted.
 216 
 217     These have no attributes.  --> <!ELEMENT restartinit    (#PCDATA) >
 218 <!ATTLIST restartinit> <!ELEMENT restartinit0    (#PCDATA) > <!ATTLIST
 219 restartinit0> <!ELEMENT   restartinitreboot    (#PCDATA) > <!ATTLIST
 220 restartinitreboot>
 221 
 222 <!--
 223   login_cmd
 224 
 225     Path to the initial login binary that should be executed when
 226     attempting to zlogin into a branded zone.
 227 
 228     The following replacements are performed:
 229 
 230       %Z  Name of the current zone
 231       %u  User login name
 232 
 233     It has no attributes.  --> <!ELEMENT login_cmd     (#PCDATA) > <!ATTLIST
 234 login_cmd>
 235 
 236 <!--
 237   forcedlogin_cmd
 238 
 239     Path to the initial login binary that should be executed when
 240     attempting to zlogin into a branded zone without authentication.
 241 


 574       ip-type  Optional, indicates that adding of the privilege to the
 575           set only applies to certain IP types. Can be "shared" or
 576           "exclusive". If it is not specified, the default value
 577           "all" will be used, which means it is applicable regardless
 578           the IP type.
 579 
 580 --> <!ELEMENT privilege    (#PCDATA) > <!ATTLIST privilege    set    ( default |
 581 prohibited | required ) #REQUIRED            name CDATA #REQUIRED
 582                ip-type ( shared | exclusive ) "all" >
 583 
 584 <!--
 585   brand
 586 
 587     The toplevel container for a brand configuration.
 588 
 589     Its attributes are
 590 
 591       name     The name of the brand.  This must match the name of the
 592           directory in which the configuration file is stored.  -->
 593 
 594 <!ELEMENT brand               (modname?, initname, restartinit?,
 595                restartinit0?, restartinitreboot?,                login_cmd,
 596                forcedlogin_cmd, user_cmd, install,               installopts?,
 597 boot?, sysboot?, halt?, shutdown?,                verify_cfg?, verify_adm?,
 598 postattach?, postclone?,                postinstall?, predetach?, attach?,
 599 detach?, clone?,              presnap?, postsnap?, validatesnap?,
 600                preuninstall?, uninstall?,              prestatechange?,
 601 poststatechange?, query?,               privilege+)>
 602 
 603 <!ATTLIST brand               name      CDATA #REQUIRED>
 604 
 605 
 606 
 607                                October 25, 2021                             ()