TL;DR

Is there a patch available to allow substitution of "array" parameters
into the strings used for exec.prestart, exec.poststop, and the like?


Longer:

I'd like to be able to use array parameters in exec.* commands,
but trying to do so results in

  jail: test-two: exec.prestart: array cannot be substituted inline

A quick check of the source didn't suggest it would work, but the
bash-isms ${host.interface[*]} and ${host.interface[@]} failed too.


The immediate application is in creating what will be the vnet.interface(s)
using netgraph on the appropriate host interfaces

  vnet.interface = ng0, ng1;

Works well, once the interfaces are created, but I'd rather not have
to define that list twice in each jail.


If I could write something like:

  vnet.interface = ng0, ng1;
  host.interface = re0, re0.100;

and then iterate over them in the prestart and poststop scripts to:

  * Create ng0 connected to re0
  * Create ng1 connected to re0.100

it would be easier to maintain than having to write something like:

  vnet.interface = ng0, ng1;
  parent.interfaces = "re0 re0.100";
  cloned.interfaces = "ng0 ng1";



I'm open to ideas here, including if I can somehow "write back" to
vnet.interface based on exec.prestart parsing the "custom" variables.


TIA,

Jeff



_______________________________________________
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"

Reply via email to