Browse Source

Rename incs_policy template

master
Jérémy Lecour 2 days ago
committed by Jérémy Lecour
parent
commit
937e75daa7
4 changed files with 15 additions and 3 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +11
    -0
      lib/bkctld-upgrade-config
  3. +3
    -3
      lib/includes
  4. +0
    -0
      tpl/incs_policy.tpl

+ 1
- 0
CHANGELOG.md View File

@ -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
- 0
lib/bkctld-upgrade-config View File

@ -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

+ 3
- 3
lib/includes View File

@ -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"


tpl/inc.tpl → tpl/incs_policy.tpl View File


Loading…
Cancel
Save