This commit is contained in:
Devaev Maxim 2019-06-26 21:31:53 +03:00
parent 8a40b1f062
commit 071fd62f41
8 changed files with 25 additions and 2 deletions

View File

@ -87,8 +87,8 @@ package_kvmd() {
for _path in "$_cfg_default/kvmd"/*.yaml; do
ln -sf "/usr/share/kvmd/configs.default/kvmd/`basename $_path`" "$pkgdir/etc/kvmd"
done
rm "$pkgdir/etc/kvmd"/{auth.yaml,meta.yaml}
cp "$_cfg_default/kvmd"/{auth.yaml,meta.yaml} "$pkgdir/etc/kvmd"
rm "$pkgdir/etc/kvmd"/{override.yaml,logging.yaml,auth.yaml,meta.yaml}
cp "$_cfg_default/kvmd"/{override.yaml,logging.yaml,auth.yaml,meta.yaml} "$pkgdir/etc/kvmd"
cp "$_cfg_default/kvmd/"*passwd "$pkgdir/etc/kvmd"
chmod 600 "$pkgdir/etc/kvmd/"*passwd
for _path in "$_cfg_default/nginx"/*.conf; do

View File

@ -1,6 +1,9 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include override.yaml
logging: !include logging.yaml
kvmd:

View File

@ -1,6 +1,9 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include override.yaml
logging: !include logging.yaml
kvmd:

View File

@ -1,6 +1,9 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include override.yaml
logging: !include logging.yaml
kvmd:

View File

@ -1,6 +1,9 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include override.yaml
logging: !include logging.yaml
kvmd:

View File

@ -0,0 +1,7 @@
# Use this file to override system settings and other configs like this:
#
# kvmd:
# server:
# heartbeat: 5.0
#
# It will be applied AFTER other configs and "!include" directives and BEFORE validation.

View File

@ -108,6 +108,7 @@ def _init_config(config_path: str, sections: List[str], override_options: List[s
scheme = _get_config_scheme(sections)
try:
_merge_dicts(raw_config, build_raw_from_options(override_options))
_merge_dicts(raw_config, (raw_config.get("override") or {}))
config = make_config(raw_config, scheme)
if "kvmd" in sections:
@ -143,6 +144,8 @@ def _merge_dicts(dest: Dict, src: Dict) -> None:
def _get_config_scheme(sections: List[str]) -> Dict:
scheme = {
"override": Option({}),
"logging": Option({}),
"kvmd": {

View File

@ -43,3 +43,4 @@ ipmi:
unix: /run/kvmd/kvmd.sock
logging: !include logging.yaml
override: !include override.yaml