【环境信息】
系统:aarch64,x86虚拟机
内存:4g
cpu:4核
OS版本:20.03-LTS-SP2
【问题复现步骤】
一、首先搭建环境:
参照#I3U746:【20.03-LTS-SP2】【arm/x86】执行automount -t 60 /etc/auto.mnt01 命令成功,但是超时自动卸载没有生效
二、设置全局变量,超时自动卸载时间,执行:automount --define TIMEOUT=60 /etc/auto.mnt01 命令
【预期结果】
1.命令执行成功;
2.60秒后,验证超时自动卸载生效
【实际结果】
1.命令执行成功;
2.60秒后,验证超时自动卸载没有生效
df -h | grep '/shared' 依然存在
Hey zjl_long, Welcome to openEuler Community.
All of the projects in openEuler Community are maintained by @openeuler-ci-bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md to find the details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
问题分析
-Dvariable=value, --define variable=value
define global macro variable
该参数用于定义全局宏变量的值,支持的宏如下所示,没有TIMEOUT
33 /* Predefined variables: tail of link chain */
34 static struct substvar
35 sv_arch = {"ARCH", un.machine, 1, NULL },
36 sv_cpu = {"CPU", processor, 1, &sv_arch},
37 sv_host = {"HOST", un.nodename, 1, &sv_cpu},
38 sv_osname = {"OSNAME", un.sysname, 1, &sv_host},
39 sv_osrel = {"OSREL", un.release, 1, &sv_osname},
40 sv_osvers = {"OSVERS", un.version, 1, &sv_osrel},
41 sv_dollar = {"dollar", "$", 1, &sv_osvers},
42 sv_true = {"true", "1", 1, &sv_dollar},
43 sv_false = {"false", "0", 1, &sv_true},
44 sv_byte = {"byte", endian, 1, &sv_false},
45 sv_host2 = {"host", host, 1, &sv_byte},
46 sv_xhost = {"xhost", host, 1, &sv_host2},
47 sv_domain = {"domain", domain, 1, &sv_xhost},
48 sv_hostd = {"hostd", hostd, 1, &sv_domain
49 };
验证通过
automount --define xhost=host /etc/auto.master
登录 后才可以发表评论