Solaris 10 What's New

Brand-Specific Handlers for zoneadm Commands

The zoneadm(1M) command is modified to call an external program that performs validation checks against a specific zoneadm operation on a branded zone. The checks are performed before the specified zoneadm subcommand is executed. However, the external brand-specific handler program for zoneadm(1M) should be specified by the brand's configuration file, /usr/lib/brand/<brand_name>/config.xml. The external program is specified by the brand's configuration file by using the <verify_adm> tag.

To introduce a new type of branded zone, and list brand-specific handlers for the zoneadm(1M) subcommand, add the following line to the brand's config.xml file:

<verify_adm><absolute path to external program> %z %* %*</verify_adm>

In this line, %z is the zone name, the first %*is the zoneadm subcommand, and the second %* is the subcommand's arguments.

This feature is useful when a given branded zone might not support all the zoneadm(1M) operations possible. Brand-specific handlers provide a way to gracefully fail unsupported zoneadm commands.

Ensure that the handler program that you specify recognizes all zoneadm(1M) subcommands.