It seems that currently there's no obvious way to create mount files for hidden directories. The escape rules described in the documentation are a little bit obscure either. E.g. # systemctl start .mntpts-doc.mount Failed to start .mntpts-doc.mount: Unit .mntpts-doc.mount failed to load: Invalid argument. See system logs and 'systemctl status .mntpts-doc.mount' for details. # systemctl status .mntpts-doc.mount ● .mntpts-doc.mount - Documents Directory Loaded: error (Reason: Invalid argument) Active: inactive (dead) Where: /.mntpts/doc What: //svc.host.dom/doc Dec 24 23:55:54 systemd[1]: .mntpts-doc.mount's Where= setting doesn't match unit name. Refusing.
I was able to get it to work by escaping the leading ".". In your case you would name your mountfile "\x2emntpts-doc.mount". You then also need to escape the mountfile name when starting/stopping it, so "systemctl start \\x2emntpts-doc.mount". The discussion of escaping on the man page doesn't seem to cover this case, but only "-" and unprintable characters. Note that if you have a .dotfile further down the path (so "/home/emergencyshower/.mntpts/doc") it seems to work fine, so this seems only to come into play where you have a dotfile in /. HTH
I think requiring the leading dot to be escaped is fine, it is quite a special case. An example in the docs would be good though.
Description clarified in http://cgit.freedesktop.org/systemd/systemd/commit/?id=995084c.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.