From 6ae576f4d3f9c8313fc4af85a40abadb7bb725ed Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Wed, 14 Aug 2024 20:16:11 +0000 Subject: [PATCH] add support for new RO mode --- .../etc/s6-overlay/s6-rc.d/init-adduser/run | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/skip-chown/root/etc/s6-overlay/s6-rc.d/init-adduser/run b/skip-chown/root/etc/s6-overlay/s6-rc.d/init-adduser/run index 1d3f7d7..0b0cb16 100755 --- a/skip-chown/root/etc/s6-overlay/s6-rc.d/init-adduser/run +++ b/skip-chown/root/etc/s6-overlay/s6-rc.d/init-adduser/run @@ -5,13 +5,15 @@ PUID=${PUID:-911} PGID=${PGID:-911} -groupmod -o -g "$PGID" abc -mkdir /dummy -usermod -d /dummy abc -usermod -o -u "$PUID" abc -usermod -d /config abc -rmdir /dummy +if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then + groupmod -o -g "$PGID" abc + mkdir /dummy + usermod -d /dummy abc + usermod -o -u "$PUID" abc + usermod -d /config abc + rmdir /dummy -lsiown abc:abc /app -lsiown abc:abc /config -lsiown abc:abc /defaults + lsiown abc:abc /app + lsiown abc:abc /config + lsiown abc:abc /defaults +fi