mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-11 08:30:57 +00:00
Support when the user field defined in Docker container is an ID. Fixes #2134
This commit is contained in:
parent
a91ed34f43
commit
2550fb3495
@ -87,5 +87,13 @@ done
|
||||
ifup -a -f
|
||||
|
||||
# continue normal docker startup
|
||||
eval HOME=$(echo ~${GNS3_USER-root})
|
||||
case "$GNS3_USER" in
|
||||
[1-9][0-9]*)
|
||||
# for when the user field defined in the Docker container is an ID
|
||||
export GNS3_USER=$(cat /etc/passwd | grep ${GNS3_USER-root} | awk -F: '{print $1}')
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
eval HOME="$(echo ~${GNS3_USER-root})"
|
||||
exec su ${GNS3_USER-root} -p -- /gns3/run-cmd.sh "$OLD_PATH" "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user