We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dcebd47 + 5b5888d commit 91532abCopy full SHA for 91532ab
1 file changed
root/etc/s6-overlay/s6-rc.d/init-adduser/run
@@ -1,7 +1,7 @@
1
#!/usr/bin/with-contenv bash
2
# shellcheck shell=bash
3
4
-if [[ -n "$USER_NAME" ]] && [[ "$USER_NAME" != "abc" ]] && grep -q "^${USER_NAME}" /etc/passwd; then
+if [[ ! -f "/usermod.done" ]] && [[ -n "${USER_NAME}" ]] && [[ "${USER_NAME}" != "abc" ]] && grep -q "^${USER_NAME}" /etc/passwd; then
5
echo "*** USER_NAME cannot be set to an user that already exists in /etc/passwd. Halting init. ***"
6
sleep infinity
7
else
@@ -14,6 +14,7 @@ PGID=${PGID:-911}
14
if [[ "$USER_NAME" != "abc" ]]; then
15
usermod -l "$USER_NAME" abc
16
groupmod -n "$USER_NAME" abc
17
+ touch /usermod.done
18
fi
19
20
groupmod -o -g "$PGID" "$USER_NAME"
0 commit comments