7 # If There's more than one possible FMRI, bail
8 fmris=( ${(f)"$(svcs -H -o fmri $fmri)"} )
9 if [[ $#fmris -gt 1 ]]; then
10 _message "'$fmri' is ambiguous"
14 # Get all the property names for the FMRI
15 props=( ${${${(f)"$(svccfg -s $fmri describe)"}:# *}%% *} )
17 _multi_parts "$expl[@]" - / props
21 local context state line subcmds
24 subcmds=( apply describe extract import validate export inventory delete addpropvalue delpropvalue )
26 if [[ $service == "svccfg" ]]; then
30 '-s[FMRI on which to operate]:fmri:_svcs_fmri -c' \
32 '-f[Read commands from file]:command file:_files' \
34 '*::command:->subcmd' && return 0
36 if (( CURRENT == 1 )); then
37 _wanted commands expl 'svccfg subcommand' compadd -a subcmds
41 curcontext="${curcontext%:*}=$service:"
47 '-V[Verify property updates]' \
56 _alternative 'files:file:_files' 'fmris:fmri:_svc_fmri -c'
65 '-f[Force deletion if online or degraded]' \
66 '*:FMRI:_svcs_fmri -c'
70 local fmri=$opt_args[-s]
72 '-v[Give all information]' \
73 '-t[Show only template data]' \
74 ":property group or property:_svccfg_properties $fmri"
81 _message "unknown svccfg subcommand: $service"