validate config

This commit is contained in:
Dmitry Belyaev 2023-05-08 23:19:39 +03:00
parent b4f9c7aeee
commit 4038c05b4d

View File

@ -31,6 +31,10 @@ install_config() {
cp -R ./config/nocloud/ ./iso/nocloud/ cp -R ./config/nocloud/ ./iso/nocloud/
} }
validate_config() {
yq ./config/nocloud/user-data > /dev/null && echo "config valid" || exit 1
}
install_1c() { install_1c() {
mkdir -p ./iso/1c/install mkdir -p ./iso/1c/install
cp $1 ./iso/1c/install cp $1 ./iso/1c/install
@ -75,6 +79,7 @@ VER_1C=$(get_1c_ver $DISTR_1C)
VER_UBUNTU=$(get_ubuntu_ver $SRC_ISO) VER_UBUNTU=$(get_ubuntu_ver $SRC_ISO)
OUT_ISO="./out/ubuntu-${VER_UBUNTU}-1c-${VER_1C}.iso" OUT_ISO="./out/ubuntu-${VER_UBUNTU}-1c-${VER_1C}.iso"
validate_config
make_folder make_folder
extract_iso $SRC_ISO extract_iso $SRC_ISO
install_config install_config