Allows to copy files from a single jail back to the host.
Usuful when building jails ad-hoc, to get back to the host files you create directly inside the jail.
This is still WIP / PoC and would require documentation changes, opening PR to
gather feedback as this is a first-time contribution.
Important changes:
- instead of relying on 0.0.0.0 to signal DHCP, we now support passing "DHCP" in
the IP parameter.
- we also support "SLAAC" as a value for the IP parameter, which enables
accepting route advertisement
- fixed an oddity in the way the gateway was being handled for IPv6 (in certain
cases it was being passed as the GATEWAY template parameter
- allow passing multiple values to the IP parameter, this would work as a quoted
parameter
- that means that, e.g. bastille create -V test 13.0-RELEASE "SLAAC DHCP" wan is
possible and creates a dual-stack jail
- passing both DHCP, SLAAC and fixed IPs is also possible, but only one IP per
protocol number is supported; last one wins
Vultr supports FreeBSD and gives us both a single ipv4 and a range of ipv6 addresses. So the simple thing to do is to give each container its own public ipv6 address. No need to mess with vnet. At least that is the theory. Wish me luck in getting this working. Am I really the first person to be using this approach?
I hope I got this all correct. I did get the containers networked correctly on vultr, but I am not a networking guy so I hope I did not misstate anything. Any edits I am happy to fix. And now I have to run, I am late for the multi lingual meetup. But this stuff is way more fun.
Updated with syntax from 0.9.20220216 as if running just bastille export TARGET it errors with:
"Error: Stream can not be written to a terminal.
You must redirect standard output.
Error: An export option is required, see 'bastille export, otherwise the user must redirect to standard output."
jail.conf has a few tricky things about it's format (such as supporting
variable expansion) so it is easiest to get jail to do the parsing for us.
The changes to get required changes to set as well as we no longer are calling
grep so that became a single awk script as well.