diff --git a/swmodd/Makefile b/swmodd/Makefile index 10d3fc886..99d4fe7a5 100755 --- a/swmodd/Makefile +++ b/swmodd/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=swmodd -PKG_VERSION:=2.1.10 +PKG_VERSION:=2.1.11 LOCAL_DEV:=0 ifneq ($(LOCAL_DEV),1) @@ -39,6 +39,10 @@ define Package/swmodd/description Software module daemon to manage software/deployment units using TR181 datamodel. endef +define Package/swmodd/config + source "$(SOURCE)/Config.in" +endef + define Package/swmodd-cgroup SECTION:=utils CATEGORY:=Utilities diff --git a/swmodd/files/etc/init.d/crun b/swmodd/files/etc/init.d/crun index 91091dcd6..4f06ce52a 100644 --- a/swmodd/files/etc/init.d/crun +++ b/swmodd/files/etc/init.d/crun @@ -55,6 +55,21 @@ configure_crun_container() { uci_set swmodd ${1} password "" result=$(${RUNNER} -b "${BUNDLE}" -n "${name}" -r "${url}" -l "${username}:${password}") if [ "$?" -eq 0 ]; then + result=$(cat ${BUNDLE}/${name}/config.json |jq '.annotations.org_opencontainers_image_description') + if [ "${result}" != "null" ]; then + uci_set swmodd ${1} description ${result} + fi + + result=$(cat ${BUNDLE}/${name}/config.json |jq '.annotations.org_opencontainers_image_vendor') + if [ "${result}" != "null" ]; then + uci_set swmodd ${1} vendor ${result} + fi + + result=$(cat ${BUNDLE}/${name}/config.json |jq '.annotations.org_opencontainers_image_version') + if [ "${result}" != "null" ]; then + uci_set swmodd ${1} version ${result} + fi + uci_set swmodd ${1} du_status Installing_success du_status="Installed" else @@ -144,7 +159,8 @@ start_service() { mkdir -p "${bundle}" config_foreach configure_crun_container du_eu_assoc "${bundle}" "${bridge}" uci_commit - ubus -t 5 call swmodules reload + # Add a timer for DuStateChange! + (sleep 5 && ubus -t 5 call swmodules reload) & } stop_service() {