Skip to content

Commit

Permalink
Improve rebooting process after image installation, add a timeout mes…
Browse files Browse the repository at this point in the history
…sage
  • Loading branch information
jorikfon committed May 14, 2024
1 parent 9d9a8f9 commit 7edac53
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Core/System/RootFS/sbin/mountoffload
Original file line number Diff line number Diff line change
Expand Up @@ -256,18 +256,18 @@ for disk in $disks; do

# Check for the presence of a "livecd" flag file in the root of the offload disk.
if [ -f /offload/livecd ]; then
echo " - Found LiveCD flag..."
echo "Press any key within 30 seconds to boot from LiveCD..."
echo " - Found LiveCD image!"
echo "\t Press any key within 30 seconds to boot from LiveCD..."
read -t 30 -n 1 input
if [ $? = 0 ]; then
echo "User selected to boot from LiveCD."
echo " - User selected to boot from LiveCD."
# Call function to create boot configuration files and recover configuration from the offload disk
createBootConfFiles
mountConfRecover "$disk"
# Exit after successfully mounting the offload disk
exit 0
else
echo "No user input detected. Booting from hard drive."
echo " - No user input detected. Booting from hard drive."
liveCDDisk=$disk
liveCDPartition=$diskPath
fi
Expand Down Expand Up @@ -392,7 +392,7 @@ for disk in $disks; do

# Check if a file named "livecd" exists in the root of the offload disk
if [ -f /offload/livecd ]; then
echo " - Found LiveUSB flag..."
echo " - Found LiveUSB image..."
mountConfRecover "$disk"
exit 0
fi
Expand Down Expand Up @@ -436,7 +436,7 @@ if [ -n "$liveCDPartition" ]; then
createBootConfFiles
mountConfRecover "$liveCDDisk"
exit 0
done
fi

# Log message indicating failure to find the /offload partition
echo "The system was unable to find the /offload partition!"
Expand Down

0 comments on commit 7edac53

Please sign in to comment.