From 3c88a0bcc2b70b12f8c6a9bffa331e3da99b4894 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Wed, 19 Mar 2025 10:48:26 -0600 Subject: [PATCH] fix listing priority again --- usr/local/share/bastille/common.sh | 4 ++-- usr/local/share/bastille/create.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/usr/local/share/bastille/common.sh b/usr/local/share/bastille/common.sh index 99318a42..dcc855e9 100644 --- a/usr/local/share/bastille/common.sh +++ b/usr/local/share/bastille/common.sh @@ -151,8 +151,8 @@ list_jail_priority() { local _boot_file=${bastille_jailsdir}/${_jail}/boot.conf # Set defaults if boot file does not exist if [ ! -f ${_boot_file} ]; then - sysrc -f ${_boot_file} boot=on - sysrc -f ${_boot_file} priority=99 + sysrc -f ${_boot_file} boot=on > /dev/null 2>&1 + sysrc -f ${_boot_file} priority=99 > /dev/null 2>&1 fi _priority="$(sysrc -f ${bastille_jailsdir}/${_jail}/boot.conf -n priority)" echo "${_jail} ${_priority}" diff --git a/usr/local/share/bastille/create.sh b/usr/local/share/bastille/create.sh index 8fdb9ef2..0c288959 100644 --- a/usr/local/share/bastille/create.sh +++ b/usr/local/share/bastille/create.sh @@ -549,6 +549,10 @@ create_jail() { # Set strict permissions on the jail by default chmod 0700 "${bastille_jailsdir}/${NAME}" + # Apply priority and boot settings before starting jail + sysrc -f "${bastille_jailsdir}/${NAME}/boot.conf" boot=${BOOT} + sysrc -f "${bastille_jailsdir}/${NAME}/boot.conf" priority="${PRIORITY}" + # Jail must be started before applying the default template. -- cwells if [ -z "${EMPTY_JAIL}" ]; then bastille start "${NAME}" @@ -656,10 +660,6 @@ create_jail() { bastille restart "${NAME}" fi fi - - # Apply priority and boot settings - sysrc -f "${bastille_jailsdir}/${NAME}/boot.conf" boot=${BOOT} - sysrc -f "${bastille_jailsdir}/${NAME}/boot.conf" priority="${PRIORITY}" } bastille_root_check