Thinstation / thinstation

A framework for making thin and light Linux based images for x86 based machines and thinclients.
https://www.thinstation.net/
810 stars 187 forks source link

Update setup-chroot: double tick to early #686

Closed crose-project closed 2 years ago

crose-project commented 2 years ago
Doncuppjr commented 2 years ago

It's not the quote position that changed the behavior, you changed a while loop into a one time test. Problem is, fuser doesn't always work.

With regards to Chrome crashing with it, might be that chrome is calling the busybox applet instead the full size fuser utility it expects.

crose-project commented 2 years ago

Your're right, "$PWD"/$mount, is valid code.

My main problem was the waiting time of several minutes after leaving setup-chroot and crashing brave/chrome. The first seems to be solved after a reboot of my machine. Nevertheless, the changed order will a) reduce waiting time, cause it does the umount first and checks than if it fails and b) don't crash brave/chrome (see below).

If I understand your code right, you try to kill (fuser -kv) all pending processes and than check for mount and do a umount. My approach is 'try the umount, if it fails, do the fuser -kv, try the umount again. You're right, fuser is not always stable and also often it takes time until pending processes disappear.

I've opened a slightly modified pull request.

For the chrome/brave crash: it happens with fuser -kv "$PWD"/proc - fortunately, with the changed order (first umount, if it fails than fuser -kv), it seems that the first try of umount succeeds and no fuser -kv is needed.