The variable `upsConnection` was defined as local inside the `configure` function but was then needed by a subequent `collect_ups_output` so the needed scope is moved to the parent `install_mod` function.
This commit is contained in:
Stefano Stella 2025-10-05 19:50:59 +02:00
parent 0184f6ee30
commit 39ec880432

View File

@ -123,7 +123,6 @@ function configure {
local sanitisedSensorsOutput local sanitisedSensorsOutput
local upsOutput local upsOutput
local modelName local modelName
local upsConnection
install_packages install_packages
@ -379,6 +378,7 @@ function configure {
# Function to install the modification # Function to install the modification
function install_mod { function install_mod {
local upsConnection
msgb "\n=== Preparing mod installation ===" msgb "\n=== Preparing mod installation ==="
check_root_privileges check_root_privileges
check_mod_installation check_mod_installation