From 424bf23aa7873661dcf09f7188a35e34b418efd3 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Sat, 12 Nov 2016 21:30:55 +0000 Subject: [PATCH] try always setting id and gid rather than test --- root/etc/cont-init.d/10-adduser | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/root/etc/cont-init.d/10-adduser b/root/etc/cont-init.d/10-adduser index c30989b..50453db 100644 --- a/root/etc/cont-init.d/10-adduser +++ b/root/etc/cont-init.d/10-adduser @@ -1,11 +1,10 @@ #!/usr/bin/with-contenv bash +[[ -z $PGID ]] && PGID="911" +[[ -z $PUID ]] && PUID="911" -PUID=${PUID:-911} -PGID=${PGID:-911} - -if [ ! "$(id -u abc)" -eq "$PUID" ]; then usermod -o -u "$PUID" abc ; fi -if [ ! "$(id -g abc)" -eq "$PGID" ]; then groupmod -o -g "$PGID" abc ; fi +groupmod -o -g "$PGID" abc +usermod -o -u "$PUID" abc echo " -------------------------------------