#2613 PR merged: In 400_save_directories.sh also exclude mountpoints below mountpoints of "type autofs"

Labels: enhancement, fixed / solved / done

jsmeix opened issue at 2021-05-07 12:27:

Right now only a preliminary proposal
that is not yet at all tested by me.

  • Brief description of the changes in this pull request:

In prep/default/400_save_directories.sh
also exclude mountpoints that are below mountpoints of "type autofs".
Such mountpoints are below an ancestor mountpoint that is owned/created by the automounter.
It is possible to create a sub-mountpoint below an automounted mountpoint
but the fact that the sub-mountpoint is not local means it should be excluded
(i.e. there is no need to recreate the non-local sub-mountpoint directory).
Furthermore automounted NFS filesystems can cause this script to hang up if NFS server fails
because the below 'stat' command may then wait indefinitely for the NFS server to respond.

jsmeix commented at 2021-05-07 12:31:

The current code should exclude all mountpoints
that are below mountpoints of "type autofs".

I wonder if that is right.

Couldn't be accidentally mountpoints excluded that should not be excluded?

jsmeix commented at 2021-05-07 12:52:

Interestingly grep -vE " something ($this|$that) "
does not show nothing when $this or $that is empty
(then it shows all lines even those that do not contain something)
in contrast to grep -vE "$this|$that"
so the code could be simplified.

jsmeix commented at 2021-05-11 09:59:

This PR was tested and
it is right to exclude all mountpoints below mountpoints of "type autofs".
see https://github.com/rear/rear/issues/2610#issuecomment-834661041

@rear/contributors
if there are no objections I would like to merge it tomorrow afternoon (CEST)


[Export of Github issue for rear/rear.]