mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-06 08:08:05 +02:00
CI: Make creation of user idempotent
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
a6da40b206
commit
b1712683ad
1 changed files with 4 additions and 2 deletions
|
|
@ -286,8 +286,10 @@ case "$ci_distro" in
|
|||
if [ "$ci_in_docker" = yes ]; then
|
||||
# Add the user that we will use to do the build inside the
|
||||
# Docker container, and let them use sudo
|
||||
useradd -m user
|
||||
passwd -ud user
|
||||
if ! getent passwd user >/dev/null; then
|
||||
useradd -m user
|
||||
passwd -ud user
|
||||
fi
|
||||
echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/nopasswd
|
||||
chmod 0440 /etc/sudoers.d/nopasswd
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue