From fb05c2013e213b080532d8eeb1bfb22ab94efe12 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Fri, 2 May 2025 11:01:26 -0600 Subject: [PATCH] fix moving to new file --- usr/local/share/bastille/common.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/usr/local/share/bastille/common.sh b/usr/local/share/bastille/common.sh index fee08310..7e1a3cfe 100644 --- a/usr/local/share/bastille/common.sh +++ b/usr/local/share/bastille/common.sh @@ -182,6 +182,16 @@ list_jail_priority() { sysrc -f ${_settings_file} depend="" >/dev/null 2>&1 sysrc -f ${_settings_file} priority=99 >/dev/null 2>&1 fi + # Add defaults if they dont exist + if ! grep -oq "boot=" ${_settings_file}; then + sysrc -f ${_settings_file} boot=on >/dev/null 2>&1 + fi + if ! grep -oq "depend=" ${_settings_file}; then + sysrc -f ${_settings_file} depend="" >/dev/null 2>&1 + fi + if ! grep -oq "priority=" ${_settings_file}; then + sysrc -f ${_settings_file} priority=99 >/dev/null 2>&1 + fi _priority="$(sysrc -f ${_settings_file} -n priority)" echo "${_jail} ${_priority}" done