Skip to content

Commit

Permalink
#188 'sudo iiab' code safety, in case /boot/filename contains spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
holta authored Sep 3, 2021
1 parent 3b9b8bf commit fa75d23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iiab
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ fi
# against users (or apt above, or unattended-upgrades) spontaneously AGAIN apt
# updating /boot e.g. kernel AT ANYTIME -- also many weeks could have passed.
bootupTime=$(($(date +%s) - $(cut -d. -f1 /proc/uptime))) # Seconds since...
bootDirLastModFile=$(date +%s -r /boot/$(ls -t /boot | head -1)) # 1970-01-01
bootDirLastModFile=$(date +%s -r "/boot/$(ls -t /boot | head -1)") # 1970-01-01
# Works w/o RTC (real-time clock, i.e. battery) because:
# Both 'apt' installs to /boot and IIAB installs require Internet (e.g. NTP).
if (( bootupTime < bootDirLastModFile )); then
Expand Down

0 comments on commit fa75d23

Please sign in to comment.