Hi curaga
This version also misses custom mounts, ...
Could you provide a detailed example of what gets missed please.
... and I feel the queue logic is worse than the current checks. If two more scripts happen to be spawned while one is running, the old version would only rerun once, this would rerun them all. ...
Exactly. A program calling rebuildfstab expects to find an updated fstab.
Consider 2 programs calling at the same time:
| ProgramA | rebuildfstab scans devices, updates fstab, launches rebuildfstab again | ProgramA reads fstab |
| ProgramB | rebuildfstab touches rescan file and exits | ProgramB reads fstab |
ProgramA is blocked until rebuildfstab updates fstab.
ProgramB is allowed to continue, unaware that rebuildfstab did not run for it.
While I don't expect this type of situation to happen often I felt it was a
better way of handling it.
... Otherwise adding custom mounts and running blkid just once ...
I'll take a closer look at that.