Tweaked docker-init.sh to create a needed GID entry before using it when creating a new user.
- Legacy-Id: 17030
This commit is contained in:
parent
d4b96188ea
commit
873494b2d7
|
@ -71,15 +71,15 @@ if [ ! -d $MYSQLDIR/ietf_utf8 ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if ! grep -q ":$GID:$" /etc/group ; then
|
||||
echo "Creating group entry for GID '$GID' ..."
|
||||
groupadd -g "$GID" "$USER"
|
||||
fi
|
||||
if ! id -u "$USER" &> /dev/null; then
|
||||
echo "Creating user '$USER' ..."
|
||||
useradd -s /bin/bash --groups staff,sudo --uid $UID --gid $GID $USER
|
||||
echo "$USER:$USER" | chpasswd
|
||||
fi
|
||||
if ! grep -q ":$GID:$" /etc/group ; then
|
||||
echo "Creating group entry for GID '$GID' ..."
|
||||
groupadd -g $GID users
|
||||
fi
|
||||
|
||||
VIRTDIR="/opt/home/$USER/$TAG"
|
||||
echo "Checking that there's a virtual environment for $TAG ..."
|
||||
|
|
Loading…
Reference in a new issue