OpenSolaris

Printable Version Enter a New Search
Bug ID 6398871
Synopsis method macros should offer simple conditional expansions
State 1-Dispatched (Default State)
Category:Subcategory utility:smf
Keywords oss-bite-size
Sponsor
Submitter
Reported Against
Duplicate Of
Introduced In
Commit to Fix
Fixed In
Release Fixed
Related Bugs
Submit Date 15-March-2006
Last Update Date 31-January-2007
Description
Service conversions often require the start method to have an additional option if
a particular property is defined.  An easy way to achieve this goal would be to add
something like the ? ternary operator, as defined in numerous programming languages.
(Another approach might be the various :=, :+, ... operations defined by the Bourne
shell descendants.)

As a simple example of each, we wish, if application/index_only is true, to invoke
catman with the -w option.  In a ternary operator scenario, this might look like

%{index_only?-w:}

For more complex cases, we might need to support some nesting, like

%{alg_list?-a %{alg_list}:}

The various supported types will each need to define a default true or false value, with
undefined always being treated equivalent to false, and, of course, we're only a small
step away from supporting simple expressions in the condition.

(This RFE will require changes to smf_method(5) and a PSARC fast track.)
Work Around
N/A
Comments
N/A