Commit 7a882e2
committed
fix: correctly modify PATH in install-proxy-rhcos.sh
The installer script wants to update the PATH variable to include
$BIN_PATH in blobfuse-proxs's systemd unit by setting:
Environment="PATH=<BIN_PATH>:$PATH"
BIN_PATH is evaluated in the installer script, and $PATH is escaped, to
be evaluated when the service unit runs.
However, environment variables like "$PATH" are NOT evaluated
by systemd in Environment="...". Quoting the documentation:
" Variable expansion is not performed inside the strings
and the "$" character has no special meaning. "
https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#Environment
This effectively removes all other paths and sets PATH to ONLY <BIN_PATH>.
The resulting environment variable PATH contains the actual contents of
BIN_PATH and a literal '$PATH'.
This commit fixes that by wrapping ExecStart in bash -c '...' and
updating PATH there.1 parent bfcc417 commit 7a882e2
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| |||
0 commit comments