Merge pull request #740 from BastilleBSD/setup-zfs-issue

setup: shellchek
This commit is contained in:
Juan David Hurtado G
2024-11-23 20:34:56 -05:00
committed by GitHub

View File

@@ -30,6 +30,7 @@
bastille_config="/usr/local/etc/bastille/bastille.conf"
. /usr/local/share/bastille/common.sh
# shellcheck source=/usr/local/etc/bastille/bastille.conf
. ${bastille_config}
usage() {
@@ -75,14 +76,16 @@ EOF
# Configure pf firewall
configure_pf() {
# shellcheck disable=SC2154
if [ ! -f "${bastille_pf_conf}" ]; then
# shellcheck disable=SC3043
local ext_if
ext_if=$(netstat -rn | awk '/default/ {print $4}' | head -n1)
info "Determined default network interface: ($ext_if)"
info "${bastille_pf_conf} does not exist: creating..."
## creating pf.conf
cat << EOF > ${bastille_pf_conf}
cat << EOF > "${bastille_pf_conf}"
## generated by bastille setup
ext_if="$ext_if"