From 72857be9d0c014220a3e07d652e44fe1b7041d61 Mon Sep 17 00:00:00 2001 From: Christer Edwards Date: Mon, 13 Apr 2020 18:01:52 -0600 Subject: [PATCH 1/2] fix route auto-detect and SERVICE template --- usr/local/share/bastille/create.sh | 2 +- usr/local/share/bastille/template.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/local/share/bastille/create.sh b/usr/local/share/bastille/create.sh index 2f37b9b1..1d6a7491 100644 --- a/usr/local/share/bastille/create.sh +++ b/usr/local/share/bastille/create.sh @@ -337,7 +337,7 @@ create_jail() { if [ -n "${bastille_network_gateway}" ]; then /usr/sbin/sysrc -f "${bastille_jail_rc_conf}" defaultrouter="${bastille_network_gateway}" else - /usr/sbin/sysrc -f "${bastille_jail_rc_conf}" defaultrouter="$(route show default | awk '/gateway/ {print $2}')" + /usr/sbin/sysrc -f "${bastille_jail_rc_conf}" defaultrouter="$(netstat -rn | awk '/default/ {print $2}')" fi fi diff --git a/usr/local/share/bastille/template.sh b/usr/local/share/bastille/template.sh index a54cb242..6535cd11 100644 --- a/usr/local/share/bastille/template.sh +++ b/usr/local/share/bastille/template.sh @@ -266,7 +266,7 @@ for _jail in ${JAILS}; do if [ -s "${bastille_template}/SERVICE" ]; then echo -e "${COLOR_GREEN}[${_jail}]:SERVICE -- START${COLOR_RESET}" while read _service; do - jexec -l "${_jail}" /usr/sbin/service "${_service}" || exit 1 + jexec -l "${_jail}" /usr/sbin/service ${_service} || exit 1 done < "${bastille_template}/SERVICE" echo -e "${COLOR_GREEN}[${_jail}]:SERVICE -- END${COLOR_RESET}" echo From 21937ddbe8f2c6dda8d02ed74b356304248e894e Mon Sep 17 00:00:00 2001 From: Christer Edwards Date: Mon, 13 Apr 2020 19:41:50 -0600 Subject: [PATCH 2/2] update VNET DHCP to SYNCDHCP --- usr/local/share/bastille/create.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/share/bastille/create.sh b/usr/local/share/bastille/create.sh index 1d6a7491..cb22afad 100644 --- a/usr/local/share/bastille/create.sh +++ b/usr/local/share/bastille/create.sh @@ -331,7 +331,7 @@ create_jail() { ## if 0.0.0.0 set DHCP ## else set static address if [ "${IP}" == "0.0.0.0" ]; then - /usr/sbin/sysrc -f "${bastille_jail_rc_conf}" ifconfig_vnet0="DHCP" + /usr/sbin/sysrc -f "${bastille_jail_rc_conf}" ifconfig_vnet0="SYNCDHCP" else /usr/sbin/sysrc -f "${bastille_jail_rc_conf}" ifconfig_vnet0="inet ${IP}" if [ -n "${bastille_network_gateway}" ]; then