When executing automount(8), it will attempt to create the directory where the
autofs filesystem is to be mounted. The problem is that automount(8) creates
the mountpoint relative to where automount(8) is executed. The expected behavior
is that automount(8) will create the mountpoint using an absolute path.
The issue is the behavior of concat(), it doesn't include the specified
separator when concatenating if either of the passed strings are empty.
Set partial to be the root path (instead of an empty string) on the first
iteration when creating the directory (i.e., the mountpoint of the autofs filesystem).
An alternative fix would be to allow concat() to concatenate the separator
when either of the strings are empty. I didn't take this approach because:
- concat() won't concatenate multiple separators together (this is the what the above fix takes advantage of).
- Without a more thorough investigation of how concat() is used in other places, I'm not certain that changing the behavior of concat() won't have unintended side-effects.