Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions scripts/reboot
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ REBOOT_SCRIPT_NAME=$(basename $0)
REBOOT_TYPE="${REBOOT_SCRIPT_NAME}"
TAG_LATEST=no
REBOOT_FLAGS=""
FORCE_REBOOT="no"

function debug()
{
Expand Down Expand Up @@ -192,7 +191,6 @@ function parse_options()
;;
f )
REBOOT_FLAGS+=" -f"
FORCE_REBOOT="yes"
;;
esac
done
Expand Down Expand Up @@ -278,12 +276,9 @@ fi
if [ -x ${DEVPATH}/${PLATFORM}/${PRE_REBOOT_HOOK} ]; then
debug "Executing the pre-reboot script"
${DEVPATH}/${PLATFORM}/${PRE_REBOOT_HOOK}
EXIT_CODE=$?
if [[ ${EXIT_CODE} != ${EXIT_SUCCESS} ]]; then
if [[ "${FORCE_REBOOT}" != "yes" ]]; then
echo "Reboot is interrupted: use -f (force) to override"
exit ${EXIT_ERROR}
fi
EXIT_CODE="$?"
if [[ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]]; then
debug "WARNING: Failed to handle pre-reboot script: rc=${EXIT_CODE}"
fi
fi

Expand Down