diff --git a/distro-build/artix.sh b/distro-build/artix.sh index 699472ef4..a0c6f37bb 100644 --- a/distro-build/artix.sh +++ b/distro-build/artix.sh @@ -40,5 +40,13 @@ write_plugin() { TARBALL_URL['aarch64']="${GIT_RELEASE_URL}/artix-aarch64-pd-${CURRENT_VERSION}.tar.xz" TARBALL_SHA256['aarch64']="$(sha256sum "${ROOTFS_DIR}/artix-aarch64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')" + + distro_setup() { + ${TAB}# Fix environment variables on login or su. + ${TAB}local f + ${TAB}for f in su su-l system-local-login system-remote-login; do + ${TAB}${TAB}echo "session required pam_env.so readenv=1" >> ./etc/pam.d/"${f}" + ${TAB}done + } EOF } diff --git a/distro-plugins/artix.sh b/distro-plugins/artix.sh index 9c2f874ee..e05e15439 100644 --- a/distro-plugins/artix.sh +++ b/distro-plugins/artix.sh @@ -6,3 +6,11 @@ DISTRO_COMMENT="Currently available only for AArch64." TARBALL_URL['aarch64']="https://github.com/termux/proot-distro/releases/download/v3.18.1/artix-aarch64-pd-v3.18.1.tar.xz" TARBALL_SHA256['aarch64']="9801031864da6bc9dc69293695797f8aba7866c273bb7403f95c4e70be987936" + +distro_setup() { + # Fix environment variables on login or su. + local f + for f in su su-l system-local-login system-remote-login; do + echo "session required pam_env.so readenv=1" >> ./etc/pam.d/"${f}" + done +}