Add RPI_REBOOT option

See: https://github.com/Hexxeh/rpi-update/issues/263
This commit is contained in:
popcornmix
2018-06-21 13:07:16 +01:00
parent 551fe49161
commit 866c310bab

View File

@@ -34,6 +34,7 @@ WANT_SYMVERS=${WANT_SYMVERS:-0}
PRUNE_MODULES=${PRUNE_MODULES:-0}
RPI_UPDATE_UNSUPPORTED=${RPI_UPDATE_UNSUPPORTED:-0}
JUST_CHECK=${JUST_CHECK:-0}
RPI_REBOOT=${RPI_REBOOT:-0}
GITHUB_API_TOKEN=${GITHUB_API_TOKEN:-""}
FW_REPO="${REPO_URI}.git"
FW_REPOLOCAL=${FW_REPOLOCAL:-"${WORK_PATH}/.rpi-firmware"}
@@ -274,8 +275,13 @@ function do_update {
sync
echo " *** If no errors appeared, your firmware was successfully updated to ${FW_REV}"
if [[ "${ROOT_PATH}" == "/" ]]; then
if [[ ${RPI_REBOOT} -ne 0 ]]; then
echo " *** Rebooting to activate the new firmware"
reboot
else
echo " *** A reboot is needed to activate the new firmware"
fi
fi
}
function download_rev {