From 01d65e5f0f130bb9619110412ce0799a744b2096 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Thu, 12 Jun 2025 12:49:02 -0600 Subject: [PATCH] network: Optimize --- usr/local/share/bastille/network.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/usr/local/share/bastille/network.sh b/usr/local/share/bastille/network.sh index 0189e8d7..a5892bc4 100644 --- a/usr/local/share/bastille/network.sh +++ b/usr/local/share/bastille/network.sh @@ -275,7 +275,6 @@ add_interface() { exec.prestart += "ifconfig ${host_epair} ether ${macaddr}a"; exec.prestart += "ifconfig ${jail_epair} ether ${macaddr}b"; exec.prestart += "ifconfig ${host_epair} description \"${_jail_vnet} host interface for Bastille jail ${_jailname}\""; - exec.poststop += "ifconfig ${_if} deletem ${host_epair}"; exec.poststop += "ifconfig ${host_epair} destroy"; } EOF @@ -287,7 +286,6 @@ EOF exec.prestart += "epair${_epair_num}=\\\$(ifconfig epair create) && ifconfig \\\${epair${_epair_num}} up name ${host_epair} && ifconfig \\\${epair${_epair_num}%a}b up name ${jail_epair}"; exec.prestart += "ifconfig ${_if} addm ${host_epair}"; exec.prestart += "ifconfig ${host_epair} description \"${_jail_vnet} host interface for Bastille jail ${_jailname}\""; - exec.poststop += "ifconfig ${_if} deletem ${host_epair}"; exec.poststop += "ifconfig ${host_epair} destroy"; } EOF @@ -342,7 +340,7 @@ EOF exec.prestart += "ifconfig ${host_epair} ether ${macaddr}a"; exec.prestart += "ifconfig ${jail_epair} ether ${macaddr}b"; exec.prestart += "ifconfig ${host_epair} description \"${_jail_vnet} host interface for Bastille jail ${_jailname}\""; - exec.poststop += "jib destroy ${jib_epair}"; + exec.poststop += "ifconfig ${host_epair} destroy"; } EOF else @@ -352,7 +350,7 @@ EOF vnet.interface += ${jail_epair}; exec.prestart += "jib addm ${jib_epair} ${_if}"; exec.prestart += "ifconfig ${host_epair} description \"${_jail_vnet} host interface for Bastille jail ${_jailname}\""; - exec.poststop += "jib destroy ${jib_epair}"; + exec.poststop += "ifconfig ${host_epair} destroy"; } EOF fi