From df9f5f97af252ec07f5912dbb8c125c5c601fd9c Mon Sep 17 00:00:00 2001 From: Vivek Kumar Dutta Date: Wed, 19 Jun 2024 11:36:22 +0530 Subject: [PATCH] swmodd: Use mounted /container path --- swmodd/Makefile | 2 +- swmodd/files/etc/config/swmodd | 3 +++ swmodd/files/etc/init.d/swmodd | 6 ++++++ swmodd/files/etc/swmodd/run.sh | 1 - 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/swmodd/Makefile b/swmodd/Makefile index 947509ee5..481881d9a 100755 --- a/swmodd/Makefile +++ b/swmodd/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=swmodd -PKG_VERSION:=2.5.11 +PKG_VERSION:=2.5.12 LOCAL_DEV:=0 ifneq ($(LOCAL_DEV),1) diff --git a/swmodd/files/etc/config/swmodd b/swmodd/files/etc/config/swmodd index 10ec7bdd6..7fe4823d0 100644 --- a/swmodd/files/etc/config/swmodd +++ b/swmodd/files/etc/config/swmodd @@ -4,3 +4,6 @@ config globals 'globals' option log_level '3' option lan_bridge 'br-lan' option root '/container' + +config execenv 'execenv_1' + option name 'oci' diff --git a/swmodd/files/etc/init.d/swmodd b/swmodd/files/etc/init.d/swmodd index f0e5fa427..f28d0fdde 100644 --- a/swmodd/files/etc/init.d/swmodd +++ b/swmodd/files/etc/init.d/swmodd @@ -90,6 +90,12 @@ start_service() { # crun default runtime directory /run, if not present then create [ ! -d "/run" ] && ln -fs /var/run /run + if [ -L "${root}" ]; then + if [ ! -d "${root}" ]; then + mkdir -p $(realpath ${root}) + fi + fi + if [ ! -d "${root}" ]; then log "# Not starting, Base root [${root}] not accessible/defined" return 1 diff --git a/swmodd/files/etc/swmodd/run.sh b/swmodd/files/etc/swmodd/run.sh index 52754aa4d..a07ed6476 100755 --- a/swmodd/files/etc/swmodd/run.sh +++ b/swmodd/files/etc/swmodd/run.sh @@ -145,7 +145,6 @@ update_config_json() { fi # Update cabalities - log "## PERM [$PERM], Name [${NAME}] ##" if [ -n "${PERM}" ]; then log "Updating Permission in the json ..." PERM="${PERM//,/ }"