Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd-nspawn --setenv fails when passing multiple variables and not specifying values #32876

Closed
chrooti opened this issue May 16, 2024 · 1 comment

Comments

@chrooti
Copy link

chrooti commented May 16, 2024

systemd version the issue has been seen with

255.6

Used distribution

Arch Linux

Linux kernel version used

6.8.9

CPU architectures issue was seen on

x86_64

Component

systemd-nspawn

Expected behaviour you didn't see

The variables are fetched from the environment and set to their corresponding value.
E.g. given

A=1
B=2
C=3

I get an nspawn container with A set to 1, B set to 2 and C set to 3.

Unexpected behaviour you saw

"Cannot assign environment variable A,B,C"
Systemd is probably trying to parse A,B,C as a single variable

Steps to reproduce the problem

systemd-nspawn -D my-nspawn-path --setenv=A,B,C /bin/sh

Additional program output to the terminal or log subsystem illustrating the issue

No response

@chrooti chrooti added the bug 🐛 Programming errors, that need preferential fixing label May 16, 2024
@chrooti chrooti changed the title systemd-nspawn --setenv fails when passing multiple variables and not specifying vaues systemd-nspawn --setenv fails when passing multiple variables and not specifying values May 16, 2024
@yuwata
Copy link
Member

yuwata commented May 16, 2024

Please use --setenv=A --setenv=B --setenv=C.

@yuwata yuwata closed this as completed May 16, 2024
@yuwata yuwata added not-a-bug and removed bug 🐛 Programming errors, that need preferential fixing labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants