Skip to content

Commit b8e0d46

Browse files
authored
Fix #77 groupmod added (non-unique -o)
```bash groupmod -o ... ``` option ```-o``` allows groupmod for non-unique id's. Result: Before on HOST: ```bash total 0 drwxr-xr-x 1 102 106 6 Aug 31 11:26 . d---------+ 1 root root 70 Aug 31 11:37 .. drwx------ 1 102 106 8 Aug 19 15:49 9.5 ``` After on HOST: ```bash total 0 drwxr-xr-x 1 admin users 6 Aug 31 11:38 . d---------+ 1 root root 70 Aug 31 11:52 .. drwx------ 1 admin users 8 Aug 19 15:49 9.5 ``` Docker log after fix #77 ```log Adapting uid and gid for postgres:postgres to 1024:100 Initializing datadir... ```
1 parent c7e1e49 commit b8e0d46

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

runtime/functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ map_uidgid() {
1919
USERMAP_UID=${USERMAP_UID:-$USERMAP_ORIG_UID}
2020
if [[ ${USERMAP_UID} != ${USERMAP_ORIG_UID} ]] || [[ ${USERMAP_GID} != ${USERMAP_ORIG_GID} ]]; then
2121
echo "Adapting uid and gid for ${PG_USER}:${PG_USER} to $USERMAP_UID:$USERMAP_GID"
22-
groupmod -g ${USERMAP_GID} ${PG_USER}
22+
groupmod -o -g ${USERMAP_GID} ${PG_USER}
2323
sed -i -e "s|:${USERMAP_ORIG_UID}:${USERMAP_GID}:|:${USERMAP_UID}:${USERMAP_GID}:|" /etc/passwd
2424
fi
2525
}

0 commit comments

Comments
 (0)