在bourne
shell脚本(#!/ bin / sh)中,如何检查是否已挂载远程NFS共享,如果未挂载,则挂载它?我现在有一套丑陋的猫,greps和ifs使用’mount’的输出,但它似乎没有做可靠的工作.
如果可能,设置automount(autofs)将是执行此操作的标准方法.它可能已经在您的发行版中(附带CentOS / Redhat默认安装).
Here is a tutorial.
原文链接:https://www.f2er.com/bash/385399.html为什么要使用Automount?
Automounting is the process where mounting and unmounting of certain filesystems is done automatically by a daemon. If the filesystem is unmounted,and a user attempts to access it,it will be automatically (re)mounted. This is especially useful in large networked environments and for crossmounting filesystems between a few machines (especially ones which are not always online).