Thanks a lot for pointing this out. Looks like at least some of the tutorials found on the net are incorrect at that point as they apparently simply have copied most of the contents of the .mount
unit in the .automount
unit.
That is interesting and important as well. Thanks a lot for making us aware - most of the SMB/CIFS tutorials appear to be wrong here, too.
So, as a result, it looks like the units shall look like below:
$ cat /etc/systemd/system/mnt-fritz.mount
[Unit]
Description=Mount Fritz NAS (/mnt/fritz)
Requires=network-online.target
After=network-online.service
[Mount]
What=//192.168.178.1/FRITZ
Where=/mnt/fritz
Type=cifs
Options=vers=2.1,noserverino,credentials=/home/gerd/.fritzcredentials,iocharset=utf8,rw,file_mode=0777,dir_mode=0777
#TimeoutSec=seconds
[Install]
WantedBy=multi-user.target
and
$ cat /etc/systemd/system/mnt-fritz.automount
[Unit]
Description=Auto Mount Fritz NAS (/mnt/fritz)
[Automount]
Where=/mnt/fritz
TimeoutIdleSec=10
[Install]
WantedBy=multi-user.target