mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-31 13:23:48 +02:00
Improvement of support for docker USER directive. Fixes #1727.
This commit is contained in:
parent
6aed064a86
commit
aa1b621c10
@ -87,9 +87,5 @@ done
|
|||||||
ifup -a -f
|
ifup -a -f
|
||||||
|
|
||||||
# continue normal docker startup
|
# continue normal docker startup
|
||||||
GNS3_CMD="PATH=$OLD_PATH exec"
|
eval HOME=$(echo ~${GNS3_USER-root})
|
||||||
while test "$#" -gt 0 ; do
|
exec su ${GNS3_USER-root} -p -- /gns3/run-cmd.sh "$OLD_PATH" "$@"
|
||||||
GNS3_CMD="${GNS3_CMD} \"${1//\"/\\\"}\""
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
exec su ${GNS3_USER-root} -p -c "$GNS3_CMD"
|
|
||||||
|
6
gns3server/compute/docker/resources/run-cmd.sh
Executable file
6
gns3server/compute/docker/resources/run-cmd.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# run docker startup, first arg is new PATH, remainder is command
|
||||||
|
|
||||||
|
PATH="$1"
|
||||||
|
shift
|
||||||
|
exec "$@"
|
Loading…
Reference in New Issue
Block a user