bkctld-upgrade-config: install check_policy template if missing
This commit is contained in:
parent
21f4544016
commit
82dbb29511
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
* bkctld-init: install check_policy template
|
* bkctld-init: install check_policy template
|
||||||
|
* bkctld-upgrade-config: install check_policy template if missing
|
||||||
* test: bkctld check-incs shouldn't fail without incs_policy file
|
* test: bkctld check-incs shouldn't fail without incs_policy file
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -45,3 +45,13 @@ elif [ -f "${legacy_incs_policy_file}" ]; then
|
||||||
|
|
||||||
info "${jail_name}: config has been upgraded"
|
info "${jail_name}: config has been upgraded"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
check_policy_file=$(jail_check_policy_file "${jail_name}")
|
||||||
|
if [ ! -f "${check_policy_file}" ]; then
|
||||||
|
check_policy_tpl="${TPLDIR}/check_policy.tpl"
|
||||||
|
test -f "${LOCALTPLDIR}/check_policy.tpl" && check_policy_tpl="${LOCALTPLDIR}/check_policy.tpl"
|
||||||
|
mkdir --parents "$(dirname "${check_policy_file}")"
|
||||||
|
install -m 0640 "${check_policy_tpl}" "${check_policy_file}"
|
||||||
|
|
||||||
|
info "${jail_name}: check_policy template ha been installed"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue