mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-30 16:14:11 +00:00
enter.sh: Split env vars by NULL byte instead of whitespace
This commit is contained in:
parent
0703759782
commit
fecf906ce5
@ -10,5 +10,5 @@ CONTAINER_PID=$($ENGINE inspect --format '{{if .State.Running}}{{.State.Pid}}{{e
|
||||
if [ -z $CONTAINER_PID ]; then
|
||||
read -p "Application must be running for a terminal to be started."
|
||||
else
|
||||
nsenter --target $CONTAINER_PID --mount --uts --ipc --net --pid -- bash -c 'export $(xargs -n 1 -0 < /proc/1/environ); exec bash'
|
||||
nsenter --target $CONTAINER_PID --mount --uts --ipc --net --pid -- bash -c 'while IFS= read -r -d "" var; do export "$var"; done < /proc/1/environ; exec bash'
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user