From aedcfa74034265c087d920d1e4aa1e105d2b99c5 Mon Sep 17 00:00:00 2001 From: nested-universe <180763510+nested-universe@users.noreply.github.com> Date: Wed, 31 Dec 2025 14:30:33 +0800 Subject: [PATCH] Add Module Load Guard Prevents redundant script loading by using a conditional flag to ensure the module is initialized only once. --- scripts/menus/9_upgrade.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/menus/9_upgrade.sh b/scripts/menus/9_upgrade.sh index 24b9750b..a91aa299 100644 --- a/scripts/menus/9_upgrade.sh +++ b/scripts/menus/9_upgrade.sh @@ -1,6 +1,9 @@ #!/bin/sh # Copyright (C) Juewuy +[ -n "$__IS_MODULE_9_UPGRADE_LOADED" ] && return +__IS_MODULE_9_UPGRADE_LOADED=1 + . "$CRASHDIR"/libs/check_dir_avail.sh . "$CRASHDIR"/libs/check_cpucore.sh . "$CRASHDIR"/libs/web_get_bin.sh