我对NFS导出文件有些不满。
具体来说,我找不到导出路径名中包含“-”的目录的方法。
手册(exports(5))指出:
Also, each line may have one or more specifications for default options
after the path name, in the form of a dash ("-") followed by an option
list. The option list is used for all subsequent exports on that line
only.
然后声明:
If an export name contains spaces it should be quoted using double quotes.
You can also specify spaces or other unusual character in the export name
using a backslash followed by the character code as three octal digits.
不幸的是,事实并非如此。具体来说,如果路径名包含“-”(逐字或用\ 055或用双引号引起来),则仍引用不带“-”的名称
有任何想法吗?我有很多目录,所有形式
- / vol / buildsystem-s3c2440
- / vol / buildsystem-tao3530
而且我更希望将它们全部作为nfs出口提供。脚本中到处都没有用“ _”替换“-”,可以用“-”完成吗?
/var/tmp/foo-bar localhost(all_squash,async,no_subtree_check)
in 为我工作/etc/exports
。
nfs-kernel-server
,但不能使用Linux nfs-user-server
。