Using `|| true` scares me. If the value of `$type` matters at all, it
could contain invalid data at this point, which could confuse the
`$test` call done later. I would far prefer to see it done with an `||
echo 'bad'`, then unmount the filesystem and exit the script if `[ $type
= 'bad' ]`. I know there's precedent elsewhere in the codebase for doing
it with `|| true`, but really I feel like the way it's done in os-probes
is dangerous and should be replaced with a similar `|| echo 'bad'`
solution. Now, to be fair, I haven't studied the code too closely (time
constraints + tired at the moment), so it could be totally fine and I'm
worried about nothing.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1987679

Title:
  os-prober leaves filesystems (lvm-thin, lvm snap) mounted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/1987679/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to