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>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libbrand/dtd/brand.dtd.1.man.txt
          +++ new/usr/src/lib/libbrand/dtd/brand.dtd.1.man.txt
↓ open down ↓ 184 lines elided ↑ open up ↑
 185  185  <!--
 186  186    initname
 187  187  
 188  188      Path to the initial executable that should be launched when booting a
 189  189      branded zone.
 190  190  
 191  191      It has no attributes.  --> <!ELEMENT initname (#PCDATA) > <!ATTLIST
 192  192  initname>
 193  193  
 194  194  <!--
 195      -  restartinit
      195 +  restartinit, restartinit0 and restartinitreboot
 196  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.
      197 +    These three boolean elements control what action is taken when the
      198 +    program specified by the 'initname' element exits.
 201  199  
 202      -    It has no attributes.  --> <!ELEMENT restartinit   (#PCDATA) > <!ATTLIST
 203      -restartinit>
      200 +    The default values are:
 204  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 +
 205  222  <!--
 206  223    login_cmd
 207  224  
 208  225      Path to the initial login binary that should be executed when
 209  226      attempting to zlogin into a branded zone.
 210  227  
 211  228      The following replacements are performed:
 212  229  
 213  230        %Z  Name of the current zone
 214  231        %u  User login name
↓ open down ↓ 352 lines elided ↑ open up ↑
 567  584  <!--
 568  585    brand
 569  586  
 570  587      The toplevel container for a brand configuration.
 571  588  
 572  589      Its attributes are
 573  590  
 574  591        name     The name of the brand.  This must match the name of the
 575  592            directory in which the configuration file is stored.  -->
 576  593  
 577      -<!ELEMENT brand          (modname?, initname, restartinit?, login_cmd,
      594 +<!ELEMENT brand          (modname?, initname, restartinit?,
      595 +               restartinit0?, restartinitreboot?,                login_cmd,
 578  596                 forcedlogin_cmd, user_cmd, install,               installopts?,
 579  597  boot?, sysboot?, halt?, shutdown?,                verify_cfg?, verify_adm?,
 580  598  postattach?, postclone?,                postinstall?, predetach?, attach?,
 581  599  detach?, clone?,              presnap?, postsnap?, validatesnap?,
 582  600                 preuninstall?, uninstall?,              prestatechange?,
 583  601  poststatechange?, query?,               privilege+)>
 584  602  
 585  603  <!ATTLIST brand          name      CDATA #REQUIRED>
 586  604  
 587  605  
 588  606  
 589  607                                 October 25, 2021                             ()
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX