Commit 8ce2e30
authored
bin/run-local-monitor.sh: Avoid to include quote in rootfs variable (#524)
From
https://www.freedesktop.org/software/systemd/man/latest/os-release.html
the format of /etc/os-release file is shell variable like to support
sourced in a shell script. So, that is the best method to parse the
file.
While the original method may include quote in the result variable,
for example, for
$ cat /etc/os-release
...
ID="mydist"
...
we will get rootfs="mydist" with the original method, while we will
get rootfs=mydist with shell source method.
So, use the shell source method to avoid the issue.
Signed-off-by: Huang Ying <ying.huang@linux.alibaba.com>
Co-authored-by: Huang Ying <ying.huang@linux.alibaba.com>1 parent a23b6fe commit 8ce2e30
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments