mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-22 02:00:08 +01:00
fix listing priority again
This commit is contained in:
@@ -151,8 +151,8 @@ list_jail_priority() {
|
|||||||
local _boot_file=${bastille_jailsdir}/${_jail}/boot.conf
|
local _boot_file=${bastille_jailsdir}/${_jail}/boot.conf
|
||||||
# Set defaults if boot file does not exist
|
# Set defaults if boot file does not exist
|
||||||
if [ ! -f ${_boot_file} ]; then
|
if [ ! -f ${_boot_file} ]; then
|
||||||
sysrc -f ${_boot_file} boot=on
|
sysrc -f ${_boot_file} boot=on > /dev/null 2>&1
|
||||||
sysrc -f ${_boot_file} priority=99
|
sysrc -f ${_boot_file} priority=99 > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
_priority="$(sysrc -f ${bastille_jailsdir}/${_jail}/boot.conf -n priority)"
|
_priority="$(sysrc -f ${bastille_jailsdir}/${_jail}/boot.conf -n priority)"
|
||||||
echo "${_jail} ${_priority}"
|
echo "${_jail} ${_priority}"
|
||||||
|
|||||||
@@ -549,6 +549,10 @@ create_jail() {
|
|||||||
# Set strict permissions on the jail by default
|
# Set strict permissions on the jail by default
|
||||||
chmod 0700 "${bastille_jailsdir}/${NAME}"
|
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
|
# Jail must be started before applying the default template. -- cwells
|
||||||
if [ -z "${EMPTY_JAIL}" ]; then
|
if [ -z "${EMPTY_JAIL}" ]; then
|
||||||
bastille start "${NAME}"
|
bastille start "${NAME}"
|
||||||
@@ -656,10 +660,6 @@ create_jail() {
|
|||||||
bastille restart "${NAME}"
|
bastille restart "${NAME}"
|
||||||
fi
|
fi
|
||||||
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
|
bastille_root_check
|
||||||
|
|||||||
Reference in New Issue
Block a user