mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 05:56:58 +02:00
Merge pull request #438 from flatcar-linux/kai/allow-id-500
Support running under UID 500
This commit is contained in:
commit
a791cb8657
@ -129,7 +129,8 @@ if [ -z "$stat" ] ; then
|
||||
-e SDK_GROUP_ID="$(id -g)" \
|
||||
--name="$name" \
|
||||
--hostname="$hostname" \
|
||||
"${container_image_name}"
|
||||
--entrypoint /bin/bash \
|
||||
"${container_image_name}" -l
|
||||
fi
|
||||
|
||||
if [ "$stat" != "Up" ] ; then
|
||||
@ -146,4 +147,4 @@ fi
|
||||
# Workaround: The SDK expects to be able to write to /etc/hosts
|
||||
$docker exec "$name" sh -c 'cp /etc/hosts /etc/hosts2; umount /etc/hosts ; mv /etc/hosts2 /etc/hosts'
|
||||
|
||||
$docker exec $tty -i "$name" /home/sdk/sdk_entry.sh "$@"
|
||||
$docker exec $tty -i "$name" /mnt/host/source/src/scripts/sdk_lib/sdk_entry.sh "$@"
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -n "${SDK_USER_ID:-}" ] ; then
|
||||
usermod -u $SDK_USER_ID sdk
|
||||
# If the "core" user from /usr/share/baselayout/passwd has the same ID, allow to take it instead
|
||||
usermod --non-unique -u $SDK_USER_ID sdk
|
||||
fi
|
||||
if [ -n "${SDK_GROUP_ID:-}" ] ; then
|
||||
groupmod -g $SDK_GROUP_ID sdk
|
||||
groupmod --non-unique -g $SDK_GROUP_ID sdk
|
||||
fi
|
||||
|
||||
chown -R sdk:sdk /home/sdk
|
||||
|
Loading…
Reference in New Issue
Block a user