From 69cf34d58819e30916d46d233e746c1a860a7024 Mon Sep 17 00:00:00 2001 From: thespad Date: Sun, 24 Nov 2024 19:31:54 +0000 Subject: [PATCH] Don't check USER_NAME if it's not set --- root/etc/s6-overlay/s6-rc.d/init-adduser/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/s6-overlay/s6-rc.d/init-adduser/run b/root/etc/s6-overlay/s6-rc.d/init-adduser/run index fc07ff3..52d7b3e 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-adduser/run +++ b/root/etc/s6-overlay/s6-rc.d/init-adduser/run @@ -1,7 +1,7 @@ #!/usr/bin/with-contenv bash # shellcheck shell=bash -if grep -q "^${USER_NAME}" /etc/passwd; then +if [[ -n "$USER_NAME" ]] && grep -q "^${USER_NAME}" /etc/passwd; then echo "*** USER_NAME cannot be set to an user that already exists in /etc/passwd. Halting init. ***" sleep infinity else