On Wed, 30 Jun 2021 at 12:01, Kent Watsen <k...@watsen.net> wrote: > I’m trying to script into a one-liner: > > # zonecfg -z zonename > zonecfg:zonename > add device > zonecfg:zonename:device> set match="/dev/zvol/rdsk/poolname/volpath” > zonecfg:zonename:device> end > > The following doesn’t work: > > # zonecfg -z zonename add device set > match="/dev/zvol/rdsk/poolname/volpath” > syntax error at 'set’ > > Variations using parentheses, square brackets, curly brackets, etc. also > didn’t work. zonefcg(1M) and online resources have eluded me so far…they > always stop short of showing how to set a complex value :argh:
As per the manual: zonecfg supports a semicolon-separated list of subcommands. For example: # zonecfg -z myzone "add net; set physical=myvnic; end" Cheers. -- Joshua M. Clulow http://blog.sysmgr.org ------------------------------------------ illumos: illumos-discuss Permalink: https://illumos.topicbox.com/groups/discuss/Tacdbb0cc9e95c176-M06b038d9c26cd4c3ed841c4a Delivery options: https://illumos.topicbox.com/groups/discuss/subscription