mirror of
https://github.com/raspberrypi/rpi-update.git
synced 2026-01-20 21:13:38 +08:00
Add RPI_REBOOT option
See: https://github.com/Hexxeh/rpi-update/issues/263
This commit is contained in:
@@ -34,6 +34,7 @@ WANT_SYMVERS=${WANT_SYMVERS:-0}
|
|||||||
PRUNE_MODULES=${PRUNE_MODULES:-0}
|
PRUNE_MODULES=${PRUNE_MODULES:-0}
|
||||||
RPI_UPDATE_UNSUPPORTED=${RPI_UPDATE_UNSUPPORTED:-0}
|
RPI_UPDATE_UNSUPPORTED=${RPI_UPDATE_UNSUPPORTED:-0}
|
||||||
JUST_CHECK=${JUST_CHECK:-0}
|
JUST_CHECK=${JUST_CHECK:-0}
|
||||||
|
RPI_REBOOT=${RPI_REBOOT:-0}
|
||||||
GITHUB_API_TOKEN=${GITHUB_API_TOKEN:-""}
|
GITHUB_API_TOKEN=${GITHUB_API_TOKEN:-""}
|
||||||
FW_REPO="${REPO_URI}.git"
|
FW_REPO="${REPO_URI}.git"
|
||||||
FW_REPOLOCAL=${FW_REPOLOCAL:-"${WORK_PATH}/.rpi-firmware"}
|
FW_REPOLOCAL=${FW_REPOLOCAL:-"${WORK_PATH}/.rpi-firmware"}
|
||||||
@@ -274,8 +275,13 @@ function do_update {
|
|||||||
sync
|
sync
|
||||||
echo " *** If no errors appeared, your firmware was successfully updated to ${FW_REV}"
|
echo " *** If no errors appeared, your firmware was successfully updated to ${FW_REV}"
|
||||||
if [[ "${ROOT_PATH}" == "/" ]]; then
|
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"
|
echo " *** A reboot is needed to activate the new firmware"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function download_rev {
|
function download_rev {
|
||||||
|
|||||||
Reference in New Issue
Block a user