Browse Source

Rename incs_policy template

evorestore
Jérémy Lecour 8 months ago
committed by Jérémy Lecour
parent
commit
937e75daa7
  1. 1
      CHANGELOG.md
  2. 11
      lib/bkctld-upgrade-config
  3. 6
      lib/includes
  4. 0
      tpl/incs_policy.tpl

1
CHANGELOG.md

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
* Rename incs_policy template
* bkctld-check-incs: Correct shellsheck warnings
### Deprecated

11
lib/bkctld-upgrade-config

@ -55,3 +55,14 @@ if [ ! -f "${check_policy_file}" ]; then
info "${jail_name}: check_policy template ha been installed"
fi
legacy_incs_policy_tpl="${LOCALTPLDIR}/inc.tpl"
incs_policy_tpl="${LOCALTPLDIR}/incs_policy.tpl"
if [ -f "${legacy_incs_policy_tpl}" ]; then
# Create directory if missing
mkdir -p "$(jail_config_dir "${jail_name}")"
# move the main config file
mv -f "${legacy_incs_policy_tpl}" "${incs_policy_tpl}"
info "${jail_name}: incs_policy local template has been renamed"
fi

6
lib/includes

@ -376,11 +376,11 @@ setup_jail_config() {
info "5 - Copie default inc configuration"
inc_policy_tpl="${TPLDIR}/inc.tpl"
test -f "${LOCALTPLDIR}/inc.tpl" && inc_policy_tpl="${LOCALTPLDIR}/inc.tpl"
incs_policy_tpl="${TPLDIR}/incs_policy.tpl"
test -f "${LOCALTPLDIR}/incs_policy.tpl" && incs_policy_tpl="${LOCALTPLDIR}/incs_policy.tpl"
jail_incs_policy_file=$(jail_incs_policy_file "${jail_name}")
mkdir --parents "$(dirname "${jail_incs_policy_file}")"
install -m 0640 "${inc_policy_tpl}" "${jail_incs_policy_file}"
install -m 0640 "${incs_policy_tpl}" "${jail_incs_policy_file}"
check_policy_tpl="${TPLDIR}/check_policy.tpl"
test -f "${LOCALTPLDIR}/check_policy.tpl" && check_policy_tpl="${LOCALTPLDIR}/check_policy.tpl"

0
tpl/inc.tpl → tpl/incs_policy.tpl

Loading…
Cancel
Save