Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Creating vnet jails with the -V option worked only for the first two. This is what was happening before the fix when creating a third vnet jail:
This is because the search pattern was looking in the wrong place (see the diff).
I've tested this fix with this:
Created 5 jails: OK
for i in $(seq 1 5); do sudo bastille create -V jail${i} 13.0-RELEASE 10.0.0.${i} wlan0; done
Created 6 different jails: OK
for i in $(seq 50 55); do sudo bastille create -V jail${i} 13.0-RELEASE 10.0.0.${i} wlan0; done
Deleted 3 jails: OK
for i in $(seq 1 3); do bastille destroy -f jail${i}; done
Created extra 3 jails: OK
for i in $(seq 60 62); do sudo bastille create -V jail${i} 13.0-RELEASE 10.0.0.${i} wlan0; done
End result:
# bastille list -a JID State IP Address Published Ports Hostname Release Path jail4 Up 10.0.0.4 - jail4 13.0-RELEASE /usr/local/bastille/jails/jail4/root jail5 Up 10.0.0.5 - jail5 13.0-RELEASE /usr/local/bastille/jails/jail5/root jail50 Up 10.0.0.50 - jail50 13.0-RELEASE /usr/local/bastille/jails/jail50/root jail51 Up 10.0.0.51 - jail51 13.0-RELEASE /usr/local/bastille/jails/jail51/root jail52 Up 10.0.0.52 - jail52 13.0-RELEASE /usr/local/bastille/jails/jail52/root jail53 Up 10.0.0.53 - jail53 13.0-RELEASE /usr/local/bastille/jails/jail53/root jail54 Up 10.0.0.54 - jail54 13.0-RELEASE /usr/local/bastille/jails/jail54/root jail55 Up 10.0.0.55 - jail55 13.0-RELEASE /usr/local/bastille/jails/jail55/root jail60 Up 10.0.0.60 - jail60 13.0-RELEASE /usr/local/bastille/jails/jail60/root jail61 Up 10.0.0.61 - jail61 13.0-RELEASE /usr/local/bastille/jails/jail61/root jail62 Up 10.0.0.62 - jail62 13.0-RELEASE /usr/local/bastille/jails/jail62/root
List of bridges:
# ifconfig -g bridge wlan0bridge
List of epairs:
# ifconfig -g epair e0a_bastille3 e0a_bastille4 e0a_bastille5 e0a_bastille6 e0a_bastille7 e0a_bastille8 e0a_bastille9 e0a_bastille10 e0a_bastille0 e0a_bastille2 e0a_bastille11