Fix umask handling for v3

This commit is contained in:
TheSpad 2022-06-20 19:58:23 +01:00 committed by Ryan Kuba
parent c758822c55
commit 92595b45d8

View file

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