From 2a5447189d13948b4e052d92c59da9d439feb807 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 13 Nov 2018 11:38:22 +0100 Subject: aktualizr: improve secondary config directory logic. Use -d and warn if directory is invalid. Signed-off-by: Patrick Vacek --- recipes-sota/aktualizr/aktualizr_git.bb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 39767d4..61ec786 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -70,9 +70,13 @@ do_install_append () { install -m 0700 -d ${D}${libdir}/sota/conf.d install -m 0700 -d ${D}${sysconfdir}/sota/conf.d - if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ] && [ -e "${SOTA_SECONDARY_CONFIG_DIR}" ]; then - install -m 0700 -d ${D}${sysconfdir}/sota/ecus - install -m 0644 "${SOTA_SECONDARY_CONFIG_DIR}"/* ${D}${sysconfdir}/sota/ecus/ + if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ]; then + if [ -d "${SOTA_SECONDARY_CONFIG_DIR}" ]; then + install -m 0700 -d ${D}${sysconfdir}/sota/ecus + install -m 0644 "${SOTA_SECONDARY_CONFIG_DIR}"/* ${D}${sysconfdir}/sota/ecus/ + else + bbwarn "SOTA_SECONDARY_CONFIG_DIR is set to an invalid directory (${SOTA_SECONDARY_CONFIG_DIR})" + fi fi } -- cgit v1.2.3-54-g00ecf