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

Commit

Permalink
Merge pull request #497 from fbelavenuto/update-modules
Browse files Browse the repository at this point in the history
Fix a bug into update modules
  • Loading branch information
fbelavenuto authored Jan 12, 2023
2 parents a8b6217 + 2e7e5c3 commit b52afda
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions files/board/arpl/overlayfs/opt/arpl/menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,8 @@ function keymapMenu() {

###############################################################################
function updateMenu() {
PLATFORM="`readModelKey "${MODEL}" "platform"`"
KVER="`readModelKey "${MODEL}" "builds.${BUILD}.kver"`"
while true; do
dialog --backtitle "`backtitle`" --menu "Choose a option" 0 0 0 \
a "Update arpl" \
Expand Down Expand Up @@ -1133,11 +1135,13 @@ function updateMenu() {
rm "${MODULES_PATH}/${P}.tgz"
mv "/tmp/${P}.tgz" "${MODULES_PATH}/${P}.tgz"
done
# Rebuild modules
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
while read ID DESC; do
writeConfigKey "modules.${ID}" "" "${USER_CONFIG_FILE}"
done < <(getAllModules "${PLATFORM}" "${KVER}")
# Rebuild modules if model/buildnumber is selected
if [ -n "${PLATFORM}" -a -n "${KVER}" ]; then
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
while read ID DESC; do
writeConfigKey "modules.${ID}" "" "${USER_CONFIG_FILE}"
done < <(getAllModules "${PLATFORM}" "${KVER}")
fi
DIRTY=1
dialog --backtitle "`backtitle`" --title "Update Modules" --aspect 18 \
--msgbox "Modules updated with success!" 0 0
Expand Down

0 comments on commit b52afda

Please sign in to comment.