quadlet: environment variable substitution works differently for podman.addf("-w=%s", workdir)
and podman.add("--workdir", workdir)
#24105
eriksjolund
started this conversation in
General
Replies: 1 comment 1 reply
-
This looks interesting, I guess it would make the most sense if quadlet behaves consistently for all options as this would effect all options not just workdir. I would say cc @ygalblum |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Environment variable substitution in systemd user service works differently
for
podman.addf("-w=%s", workdir)
andpodman.add("--workdir", workdir)
test environment variable substitution in systemd user service
I perfomed these steps:
sudo useradd test
sudo machinectl shell --uid=test
mkdir -p ~/.config/systemd/user
systemctl --user daemon-reload
systemctl --user start test.service
summary of the result:
Discussion
Variable substitution thus behaves differently depending on whether quadlet.go implements
WorkingDir=
withor
Currently the first alternative is used
podman/pkg/systemd/quadlet/quadlet.go
Line 786 in e1496c9
(a GitHub permalink as of 29 September 2024)
Because of that, the following example
in
podman/docs/source/markdown/podman-systemd.unit.5.md
Line 336 in e1496c9
does not work.
Beta Was this translation helpful? Give feedback.
All reactions