我想在启动时在文件服务器上挂载一个目录。这是我的/etc/fstab条目:
# mount the fileserver
https://fsrv.company/ /mnt/fileserver davfs user,auto 0 0
Run Code Online (Sandbox Code Playgroud)
手动安装它mount /mnt/fileserver工作正常。但是,由于证书过时,这会发出提示,我总是必须回答是:
/sbin/mount.davfs: the server certificate does not match the server name
/sbin/mount.davfs: the server certificate is not trusted
[...]
Accept certificate for this session? [y,N] y
Run Code Online (Sandbox Code Playgroud)
启动 Ubuntu 时应安装此设备(由于auto选项)。但是,设备未安装,可能是因为需要输入。文件服务器的所有者不会更新其证书。
我怎样才能自动化这个过程,这样设备在启动时安装,答案总是y\n?
编辑:我确实下载了证书并将其放置在.davfs2/certs/并编辑了.davfs2/davfs2.conf 中的条目(如下面@Oli 所提示),但交互式输入仍然存在。