mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-04 11:43:48 +01:00
Small cosmetic/typo corrections
This commit is contained in:
@@ -50,24 +50,24 @@ TARGET="${1}"
|
||||
|
||||
# Gather bastille list info(sysrc targets /etc/rc.conf by default).
|
||||
# Default bastille rc vars are bastille_enable and bastille_list.
|
||||
BASTILLE_DISABLE_STAT=$(sysrc -qn bastille_enable)
|
||||
BASILLE_LIST_CURRENT=$(sysrc -qn bastille_list)
|
||||
BASTILLE_LIST_CURRENT=$(sysrc -qn bastille_list)
|
||||
BASTILLE_LIST_TARGET=$(sysrc -qn bastille_list | tr -s " " "\n" | awk "/^${TARGET}$/")
|
||||
|
||||
bastille_disable_check(){
|
||||
# Check bastille disable status.
|
||||
if [ "${BASTILLE_DISABLE_STAT}" != "NO" ]; then
|
||||
BASTILLE_ENABLE_STAT=$(sysrc -qn bastille_enable)
|
||||
if [ "${BASTILLE_ENABLE_STAT}" != "NO" ]; then
|
||||
sysrc bastille_enable="NO"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "${TARGET}" = 'ALL' ]; then
|
||||
if [ -n "${BASILLE_LIST_CURRENT}" ]; then
|
||||
if [ -n "${BASTILLE_LIST_CURRENT}" ]; then
|
||||
# Clear current startup list.
|
||||
info "Disabling all jails..."
|
||||
sysrc bastille_list=
|
||||
info "All jails disabled."
|
||||
elif [ -z "${BASILLE_LIST_CURRENT}" ]; then
|
||||
elif [ -z "${BASTILLE_LIST_CURRENT}" ]; then
|
||||
error_exit "All jails already disabled."
|
||||
fi
|
||||
bastille_disable_check
|
||||
|
||||
@@ -50,19 +50,19 @@ TARGET="${1}"
|
||||
|
||||
# Gather bastille list info(sysrc targets /etc/rc.conf by default).
|
||||
# Default bastille rc vars are bastille_enable and bastille_list.
|
||||
BASTILLE_ENABLE_STAT=$(sysrc -qn bastille_enable)
|
||||
BASILLE_LIST_CURRENT=$(sysrc -qn bastille_list)
|
||||
BASTILLE_LIST_CURRENT=$(sysrc -qn bastille_list)
|
||||
BASTILLE_LIST_TARGET=$(sysrc -qn bastille_list | tr -s " " "\n" | awk "/^${TARGET}$/")
|
||||
|
||||
bastille_enable_check(){
|
||||
# Check bastille enable status.
|
||||
BASTILLE_ENABLE_STAT=$(sysrc -qn bastille_enable)
|
||||
if [ "${BASTILLE_ENABLE_STAT}" != "YES" ]; then
|
||||
sysrc bastille_enable="YES"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "${TARGET}" = 'ALL' ]; then
|
||||
if [ -n "${BASILLE_LIST_CURRENT}" ]; then
|
||||
if [ -n "${BASTILLE_LIST_CURRENT}" ]; then
|
||||
# Clear current list to re-apply default jail startup list.
|
||||
info "Clearing current startup list..."
|
||||
sysrc bastille_list=
|
||||
|
||||
Reference in New Issue
Block a user