mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Ensure we flush everything to disk after an update. (#5685)
WIll stall for longer, but with a visible message (vs. less stalling on a white screen during the startup and a laggy FM for a while).
This commit is contained in:
@@ -34,6 +34,8 @@ ko_update_check() {
|
||||
fi
|
||||
rm -f "${NEWUPDATE}" # always purge newupdate in all cases to prevent update loop
|
||||
unset BLOCKS CPOINTS
|
||||
# Ensure everything is flushed to disk before we restart. This *will* stall for a while on slow storage!
|
||||
sync
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,8 @@ ko_update_check() {
|
||||
fi
|
||||
rm -f "${NEWUPDATE}" # always purge newupdate in all cases to prevent update loop
|
||||
unset BLOCKS CPOINTS
|
||||
# Ensure everything is flushed to disk before we restart. This *will* stall for a while on slow storage!
|
||||
sync
|
||||
fi
|
||||
}
|
||||
# NOTE: Keep doing an initial update check, in addition to one during the restart loop, so we can pickup potential updates of this very script...
|
||||
|
||||
@@ -49,6 +49,8 @@ ko_update_check() {
|
||||
fi
|
||||
rm -f "${NEWUPDATE}" # always purge newupdate in all cases to prevent update loop
|
||||
unset BLOCKS CPOINTS
|
||||
# Ensure everything is flushed to disk before we restart. This *will* stall for a while on slow storage!
|
||||
sync
|
||||
fi
|
||||
}
|
||||
# NOTE: Keep doing an initial update check, in addition to one during the restart loop, so we can pickup potential updates of this very script...
|
||||
|
||||
Reference in New Issue
Block a user