rc: Add comments

This commit is contained in:
tschettervictor
2025-03-13 00:03:30 -06:00
committed by GitHub
parent 9910ee882d
commit 4813f7d3b0

View File

@@ -9,18 +9,12 @@
# Add the following to /etc/rc.conf[.local] to enable this service
#
# bastille_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable bastille.
# Set it to "YES" to enable bastille.
# bastille_conf (bool): Set to "/usr/local/etc/bastille/bastille.conf" by default.
# Path to bastile.conf file. Used if bastille_rcorder="YES".
# bastille_list (string): Set to "ALL" by default.
# Space separated list of jails to start or "ALL" to start all
# jails.
# bastille_rcorder (bool): Set to "NO" by default.
# Set it to "YES" to start all jails in order, defined by
# rcorder(8). It starts all jails, except jails with "KEYWORD:
# nostart" in jail.conf. Value of bastille_list is ignored in this
# case, requires correct path to bastile.conf in bastille_conf
# var.
# Path to bastile.conf file.
# bastille_startup_delay (bool): Set to 0 by default.
# Set to a numerical value.
# This is the delay between startup of each jail.
#
. /etc/rc.subr
@@ -40,6 +34,7 @@ restart_cmd="bastille_stop && bastille_start"
bastille_start()
{
local _jailsdir=$(. $bastille_conf; echo $bastille_jailsdir)
# Sort jails by priority value
local _priority_list=$(grep -Eo "^priority=\"[0-9]+\"$" ${_jailsdir}/*/boot.conf | sort -t '"' -k2 -n | awk -F'/' '{print $(NF-1)}')
for _jail in ${_priority_list}; do
@@ -63,6 +58,7 @@ bastille_start()
bastille_stop()
{
local _jailsdir=$(. $bastille_conf; echo $bastille_jailsdir)
# Sort jails by priority value, in reverse order
local _priority_list_rev=$(grep -Eo "^priority=\"[0-9]+\"$" ${_jailsdir}/*/boot.conf | sort -t '"' -k2 -nr | awk -F'/' '{print $(NF-1)}')
for _jail in ${_priority_list_rev}; do