swmodd: Use mounted /container path

This commit is contained in:
Vivek Kumar Dutta 2024-06-19 11:36:22 +05:30
parent 8766ee44d6
commit df9f5f97af
4 changed files with 10 additions and 2 deletions

View file

@ -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)

View file

@ -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'

View file

@ -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

View file

@ -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//,/ }"