From 1f96c3d295819bacbda3b50d7ebd5df816a7a822 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Dutta Date: Wed, 5 Nov 2025 15:47:15 +0530 Subject: [PATCH] sysmngr: 1.1.1 --- sysmngr/Makefile | 2 +- sysmngr/files/etc/sysmngr/fwbank | 29 ++++++++++++++++++++--------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/sysmngr/Makefile b/sysmngr/Makefile index 54f512f3f..d39b5bf6f 100644 --- a/sysmngr/Makefile +++ b/sysmngr/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sysmngr -PKG_VERSION:=1.1.0 +PKG_VERSION:=1.1.1 LOCAL_DEV:=0 ifneq ($(LOCAL_DEV),1) diff --git a/sysmngr/files/etc/sysmngr/fwbank b/sysmngr/files/etc/sysmngr/fwbank index 81602d149..c3aa1153a 100755 --- a/sysmngr/files/etc/sysmngr/fwbank +++ b/sysmngr/files/etc/sysmngr/fwbank @@ -135,7 +135,15 @@ case "$1" in keep_settings=${keep_settings:-1} if command -v "opconf_conf_handler" >/dev/null 2>&1; then - opconf_conf_handler "${keep_settings:+-k} ${keep_settings}" "${keep_opconf:+-o} ${keep_opconf}" "${config_scope:+-s} ${config_scope}" + arg="-k ${keep_settings}" + [ -n "${keep_opconf}" ] && arg="${arg} -o ${keep_opconf}" + [ -n "${config_scope}" ] && arg="${arg} -s ${config_scope}" + + opconf_conf_handler ${arg} + logger -t sysmngr.fwbank ["opconf_conf_handler ${arg}]" + else + # Fallback to default old behaviour in case opconf not present + config_scope="All" fi ret=0 @@ -207,6 +215,17 @@ case "$1" in sysupgrade_flag="--no-activate" fi + if command -v "opconf_conf_handler" >/dev/null 2>&1; then + arg="-k ${keep_settings}" + [ -n "${keep_opconf}" ] && arg="${arg} -o ${keep_opconf}" + [ -n "${config_scope}" ] && arg="${arg} -s ${config_scope}" + + opconf_conf_handler ${arg} + else + # Fallback to default old behaviour in case opconf not present + config_scope="All" + fi + # Set the flag to do not save configuration over reflash if [ "${keep_settings}" -eq 0 ]; then sysupgrade_flag="${sysupgrade_flag} -n" @@ -216,14 +235,6 @@ case "$1" in fi fi - if command -v "opconf_conf_handler" >/dev/null 2>&1; then - arg="" - [ -n "${keep_settings}" ] && arg="-k ${keep_settings}" - [ -n "${keep_opconf}" ] && arg="${arg} -o ${keep_opconf}" - [ -n "${config_scope}" ] && arg="${arg} -s ${config_scope}" - - opconf_conf_handler "${arg}" - fi # Call sysupgrade synchonously. It should not time out the ubus call, # as it will just verify the image and do an ubus call, leading to # do_stage2 doing the actual upgrade.