From 5632ca1fdd8a1ed494c5460558acc9354be6048e 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 37dc6d4..e44780f 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -71,9 +71,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