Add sleep to shutting down jails.

This commit is contained in:
Tom Alexander
2024-07-07 18:09:15 -04:00
parent ab572079ac
commit f6152d92f1
14 changed files with 22 additions and 19 deletions

View File

@@ -2,7 +2,7 @@ admin_git {
path = "/jail/${name}";
vnet;
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start jail_nat jail${name} 10.215.1.1/24";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
exec.poststop += "sleep 10; /usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
vnet.interface += "jail${name}";
devfs_ruleset = 14;

View File

@@ -2,7 +2,7 @@ bastion {
path = "/jail/${name}";
vnet;
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start jail_nat jail${name} 10.215.1.1/24";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
exec.poststop += "sleep 10; /usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
vnet.interface += "jail${name}";
devfs_ruleset = 14;

View File

@@ -2,7 +2,7 @@ certificate {
path = "/jail/${name}";
vnet;
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start jail_nat jail${name} 10.215.1.1/24";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
exec.poststop += "sleep 10; /usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
vnet.interface += "jail${name}";
devfs_ruleset = 14;

View File

@@ -4,8 +4,8 @@ cloak {
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start restricted_nat jail${name} 10.215.2.1/24";
# Create a dummy interface that is never used, just to create the cloak bridge that is used by children.
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start cloak dummy${name} 192.168.1.0/24";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop cloak dummy{name}";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop restricted_nat jail${name}";
exec.poststop += "sleep 10; /usr/local/bin/jail_netgraph_bridge stop cloak dummy{name}";
exec.poststop += "sleep 10; /usr/local/bin/jail_netgraph_bridge stop restricted_nat jail${name}";
vnet.interface += "jail${name}";
vnet.interface += "cloak";

View File

@@ -4,7 +4,7 @@ dagger {
vnet.interface += "dagger";
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start cloak ${name} 192.168.1.0/24";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop cloak ${name}";
exec.poststop += "sleep 10; /usr/local/bin/jail_netgraph_bridge stop cloak ${name}";
mount.fstab = "/etc/fstab.${name}";

View File

@@ -2,7 +2,7 @@ nat_dhcp {
path = "/jail/${name}";
vnet;
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start jail_nat jail${name} 10.215.1.1/24";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
exec.poststop += "sleep 10; /usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
vnet.interface += "jail${name}";
devfs_ruleset = 14;

View File

@@ -4,7 +4,7 @@ olddagger {
vnet.interface += "olddagger";
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start cloak ${name} 192.168.1.0/24";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop cloak ${name}";
exec.poststop += "sleep 10; /usr/local/bin/jail_netgraph_bridge stop cloak ${name}";
mount.fstab = "/etc/fstab.${name}";

View File

@@ -2,7 +2,7 @@ public_dns {
path = "/jail/${name}";
vnet;
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start jail_nat jail${name} 10.215.1.1/24";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
exec.poststop += "sleep 10; /usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
vnet.interface += "jail${name}";
devfs_ruleset = 14;

View File

@@ -2,7 +2,7 @@ sample {
path = "/jail/${name}";
vnet;
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start jail_nat jail${name} 10.215.1.1/24";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
exec.poststop += "sleep 10; /usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
vnet.interface += "jail${name}";
devfs_ruleset = 14;

View File

@@ -2,7 +2,7 @@ sftp {
path = "/jail/${name}";
vnet;
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start jail_nat jail${name} 10.215.1.1/24";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
exec.poststop += "sleep 10; /usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
vnet.interface += "jail${name}";
devfs_ruleset = 14;