Skip to content
This repository was archived by the owner on May 8, 2024. It is now read-only.

Commit b52afda

Browse files
authored
Merge pull request #497 from fbelavenuto/update-modules
Fix a bug into update modules
2 parents a8b6217 + 2e7e5c3 commit b52afda

File tree

1 file changed

+9
-5
lines changed
  • files/board/arpl/overlayfs/opt/arpl

1 file changed

+9
-5
lines changed

files/board/arpl/overlayfs/opt/arpl/menu.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,8 @@ function keymapMenu() {
973973

974974
###############################################################################
975975
function updateMenu() {
976+
PLATFORM="`readModelKey "${MODEL}" "platform"`"
977+
KVER="`readModelKey "${MODEL}" "builds.${BUILD}.kver"`"
976978
while true; do
977979
dialog --backtitle "`backtitle`" --menu "Choose a option" 0 0 0 \
978980
a "Update arpl" \
@@ -1133,11 +1135,13 @@ function updateMenu() {
11331135
rm "${MODULES_PATH}/${P}.tgz"
11341136
mv "/tmp/${P}.tgz" "${MODULES_PATH}/${P}.tgz"
11351137
done
1136-
# Rebuild modules
1137-
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
1138-
while read ID DESC; do
1139-
writeConfigKey "modules.${ID}" "" "${USER_CONFIG_FILE}"
1140-
done < <(getAllModules "${PLATFORM}" "${KVER}")
1138+
# Rebuild modules if model/buildnumber is selected
1139+
if [ -n "${PLATFORM}" -a -n "${KVER}" ]; then
1140+
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
1141+
while read ID DESC; do
1142+
writeConfigKey "modules.${ID}" "" "${USER_CONFIG_FILE}"
1143+
done < <(getAllModules "${PLATFORM}" "${KVER}")
1144+
fi
11411145
DIRTY=1
11421146
dialog --backtitle "`backtitle`" --title "Update Modules" --aspect 18 \
11431147
--msgbox "Modules updated with success!" 0 0

0 commit comments

Comments
 (0)