mirror of
https://github.com/bensuperpc/dockcross.git
synced 2026-10-25 11:15:05 +01:00
base: support BUILDER_USER, BUILDER_GROUP, and liquidprompt bash
This commit is contained in:
1 parent
4c8658f652
commit
3a96030b23
4 files changed
+32
-5
No files matched your search
@@ -23,11 +23,11 @@ fi
|
||||
# The dockcross script sets the BUILDER_UID and BUILDER_GID vars.
|
||||
if [[ -n $BUILDER_UID ]] && [[ -n $BUILDER_GID ]]; then
|
||||
|
||||
BUILDER_USER=dockcross-user
|
||||
BUILDER_GROUP=dockcross-group
|
||||
|
||||
groupadd -o -g $BUILDER_GID $BUILDER_GROUP 2> /dev/null
|
||||
useradd -o -g $BUILDER_GID -u $BUILDER_UID $BUILDER_USER 2> /dev/null
|
||||
useradd -o -m -g $BUILDER_GID -u $BUILDER_UID $BUILDER_USER 2> /dev/null
|
||||
export HOME=/home/${BUILDER_USER}
|
||||
cp /root/.bashrc $HOME
|
||||
chown $BUILDER_UID:$BUILDER_GID $HOME/.bashrc
|
||||
|
||||
# Run the command as the specified user/group.
|
||||
exec chpst -u :$BUILDER_UID:$BUILDER_GID "$@"
|
||||
|
||||
Reference in new issue
Block a user