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>


 195     Path to the kernel module that implements the kernel-level
 196     functionality of the brand.
 197 
 198     It has no attributes.
 199 -->
 200 <!ELEMENT modname    (#PCDATA) >
 201 <!ATTLIST modname>
 202 
 203 <!--
 204   initname
 205 
 206     Path to the initial executable that should be launched when booting a
 207     branded zone.
 208 
 209     It has no attributes.
 210 -->
 211 <!ELEMENT initname   (#PCDATA) >
 212 <!ATTLIST initname>
 213 
 214 <!--
 215   restartinit
 216 
 217     Boolean indicating that the program specified by the initname attr
 218     should be restarted, or not, if it exits.  By default, the init program
 219     will be restarted if this attribute is not provided.  Specifying false
 220     for this attr will prevent that.
 221 
 222     It has no attributes.

















 223 -->
 224 <!ELEMENT restartinit        (#PCDATA) >
 225 <!ATTLIST restartinit>




 226 
 227 <!--
 228   login_cmd
 229 
 230     Path to the initial login binary that should be executed when
 231     attempting to zlogin into a branded zone.
 232 
 233     The following replacements are performed:
 234 
 235       %Z        Name of the current zone
 236       %u        User login name
 237 
 238     It has no attributes.
 239 -->
 240 <!ELEMENT login_cmd  (#PCDATA) >
 241 <!ATTLIST login_cmd>
 242 
 243 <!--
 244   forcedlogin_cmd
 245 


 625                 "all" will be used, which means it is applicable regardless
 626                 the IP type.
 627 
 628 -->
 629 <!ELEMENT privilege  (#PCDATA) >
 630 <!ATTLIST privilege  set     ( default | prohibited | required ) #REQUIRED 
 631                         name    CDATA #REQUIRED
 632                         ip-type ( shared | exclusive ) "all" >
 633 
 634 <!--
 635   brand
 636 
 637     The toplevel container for a brand configuration.
 638 
 639     Its attributes are
 640 
 641       name      The name of the brand.  This must match the name of the
 642                 directory in which the configuration file is stored.
 643 -->
 644 
 645 <!ELEMENT brand              (modname?, initname, restartinit?, login_cmd,


 646                         forcedlogin_cmd, user_cmd, install,
 647                         installopts?, boot?, sysboot?, halt?, shutdown?,
 648                         verify_cfg?, verify_adm?, postattach?, postclone?,
 649                         postinstall?, predetach?, attach?, detach?, clone?,
 650                         presnap?, postsnap?, validatesnap?,
 651                         preuninstall?, uninstall?,
 652                         prestatechange?, poststatechange?, query?,
 653                         privilege+)>
 654 
 655 <!ATTLIST brand              name            CDATA #REQUIRED>


 195     Path to the kernel module that implements the kernel-level
 196     functionality of the brand.
 197 
 198     It has no attributes.
 199 -->
 200 <!ELEMENT modname    (#PCDATA) >
 201 <!ATTLIST modname>
 202 
 203 <!--
 204   initname
 205 
 206     Path to the initial executable that should be launched when booting a
 207     branded zone.
 208 
 209     It has no attributes.
 210 -->
 211 <!ELEMENT initname   (#PCDATA) >
 212 <!ATTLIST initname>
 213 
 214 <!--
 215   restartinit, restartinit0 and restartinitreboot
 216 
 217     These three boolean elements control what action is taken when the
 218     program specified by the 'initname' element exits.


 219 
 220     The default values are:
 221 
 222         restartinit:       true
 223         restartinit0:      false
 224         restartinitreboot: false
 225 
 226     If 'restartinit' is set to false then the init process will never be
 227     restarted and the zone will shut down once init exits. In this case, the
 228     other restartinit elements are ignored.
 229 
 230     When 'restartinit0' is set, init will only be restarted if it exited with
 231     an exit status of 0, otherwise the zone will shut down.
 232 
 233     If 'restartinitreboot' is set to true then whenever init should be
 234     restarted, based on the other restartinit elements, the zone will instead
 235     be rebooted.
 236 
 237     These have no attributes.
 238 -->
 239 <!ELEMENT restartinit        (#PCDATA) >
 240 <!ATTLIST restartinit>
 241 <!ELEMENT restartinit0       (#PCDATA) >
 242 <!ATTLIST restartinit0>
 243 <!ELEMENT restartinitreboot  (#PCDATA) >
 244 <!ATTLIST restartinitreboot>
 245 
 246 <!--
 247   login_cmd
 248 
 249     Path to the initial login binary that should be executed when
 250     attempting to zlogin into a branded zone.
 251 
 252     The following replacements are performed:
 253 
 254       %Z        Name of the current zone
 255       %u        User login name
 256 
 257     It has no attributes.
 258 -->
 259 <!ELEMENT login_cmd  (#PCDATA) >
 260 <!ATTLIST login_cmd>
 261 
 262 <!--
 263   forcedlogin_cmd
 264 


 644                 "all" will be used, which means it is applicable regardless
 645                 the IP type.
 646 
 647 -->
 648 <!ELEMENT privilege  (#PCDATA) >
 649 <!ATTLIST privilege  set     ( default | prohibited | required ) #REQUIRED
 650                         name    CDATA #REQUIRED
 651                         ip-type ( shared | exclusive ) "all" >
 652 
 653 <!--
 654   brand
 655 
 656     The toplevel container for a brand configuration.
 657 
 658     Its attributes are
 659 
 660       name      The name of the brand.  This must match the name of the
 661                 directory in which the configuration file is stored.
 662 -->
 663 
 664 <!ELEMENT brand              (modname?, initname, restartinit?,
 665                         restartinit0?, restartinitreboot?,
 666                         login_cmd,
 667                         forcedlogin_cmd, user_cmd, install,
 668                         installopts?, boot?, sysboot?, halt?, shutdown?,
 669                         verify_cfg?, verify_adm?, postattach?, postclone?,
 670                         postinstall?, predetach?, attach?, detach?, clone?,
 671                         presnap?, postsnap?, validatesnap?,
 672                         preuninstall?, uninstall?,
 673                         prestatechange?, poststatechange?, query?,
 674                         privilege+)>
 675 
 676 <!ATTLIST brand              name            CDATA #REQUIRED>