Fix umask handling for s6 v3

This commit is contained in:
TheSpad 2022-06-20 19:59:05 +01:00 committed by Ryan Kuba
parent 71347b20aa
commit 4020c0ea29

View file

@ -1,7 +1,9 @@
#! /bin/bash #! /bin/bash
if [[ -f /var/run/s6/container_environment/UMASK ]] && [[ "$(pwdx $$)" =~ "/run/s6/services/" ]]; then
umask $(cat /var/run/s6/container_environment/UMASK) if [[ -f /var/run/s6/container_environment/UMASK ]] && \
exec /command/with-contenv "$@" { [[ "$(pwdx $$)" =~ "/run/s6/legacy-services/" ]] || \
else [[ "$(pwdx $$)" =~ "/run/s6/services/" ]] || \
exec /command/with-contenv "$@" [[ "$(pwdx $$)" =~ "/servicedirs/svc-" ]]; }; then
umask $(cat /var/run/s6/container_environment/UMASK)
fi fi
exec /command/with-contenv "$@"