this post was submitted on 04 Jul 2026
33 points (100.0% liked)
Linux
14216 readers
337 users here now
A community for everything relating to the GNU/Linux operating system (except the memes!)
Also, check out:
Original icon base courtesy of lewing@isc.tamu.edu and The GIMP
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Why do you need the
while true?I suppose it would be useful for flakey internet connection, then your update would restart 5 minutes after losing the connection. It surely has a yucky aftertaste, though.
No, the idea was that
apt updatewould keep failing while the system upgrade was running (and holding the lock):But there are better ways of waiting for a process to finish, that other people have shared
Otherwise it'd only check for the lock once. It'd run, go "oops, apt is in use!", and quit, and never check again.
The loop here is what makes it check again at all.
-- Frost