sysmngr: fallback to full backup if usr_data partition missing

This commit is contained in:
Vivek Kumar Dutta 2025-11-10 17:21:36 +05:30
parent 966dbd6038
commit f9ad16934c
No known key found for this signature in database
GPG key ID: 4E09F5AD8265FD4C

View file

@ -135,12 +135,16 @@ case "$1" in
keep_settings=${keep_settings:-1} keep_settings=${keep_settings:-1}
if command -v "opconf_conf_handler" >/dev/null 2>&1; then if command -v "opconf_conf_handler" >/dev/null 2>&1; then
if ! mountpoint -q /usr_data; then
logger -t sysmngr.fwbank "copy_config: usr_data partition not present"
config_scope="All"
fi
arg="-k ${keep_settings}" arg="-k ${keep_settings}"
[ -n "${keep_opconf}" ] && arg="${arg} -o ${keep_opconf}" [ -n "${keep_opconf}" ] && arg="${arg} -o ${keep_opconf}"
[ -n "${config_scope}" ] && arg="${arg} -s ${config_scope}" [ -n "${config_scope}" ] && arg="${arg} -s ${config_scope}"
opconf_conf_handler ${arg} opconf_conf_handler ${arg}
logger -t sysmngr.fwbank ["opconf_conf_handler ${arg}]"
else else
# Fallback to default old behaviour in case opconf not present # Fallback to default old behaviour in case opconf not present
config_scope="All" config_scope="All"
@ -216,6 +220,11 @@ case "$1" in
fi fi
if command -v "opconf_conf_handler" >/dev/null 2>&1; then if command -v "opconf_conf_handler" >/dev/null 2>&1; then
if ! mountpoint -q /usr_data; then
logger -t sysmngr.fwbank "upgrade: usr_data partition not present"
config_scope="All"
fi
arg="-k ${keep_settings}" arg="-k ${keep_settings}"
[ -n "${keep_opconf}" ] && arg="${arg} -o ${keep_opconf}" [ -n "${keep_opconf}" ] && arg="${arg} -o ${keep_opconf}"
[ -n "${config_scope}" ] && arg="${arg} -s ${config_scope}" [ -n "${config_scope}" ] && arg="${arg} -s ${config_scope}"