From 373f98298ee9b474fa55eae6bdcedd0eb2c7c8e4 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Wed, 25 Oct 2023 20:36:10 +0300 Subject: [PATCH] manjaro: ensure that /etc/environment always read Adjust PAM configuration. --- distro-build/manjaro.sh | 9 +++++++++ distro-plugins/manjaro.sh | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/distro-build/manjaro.sh b/distro-build/manjaro.sh index c366df5a9..08ff7afb2 100644 --- a/distro-build/manjaro.sh +++ b/distro-build/manjaro.sh @@ -44,4 +44,13 @@ write_plugin() { TARBALL_URL['aarch64']="${GIT_RELEASE_URL}/manjaro-aarch64-pd-${CURRENT_VERSION}.tar.xz" TARBALL_SHA256['aarch64']="$(sha256sum "${ROOTFS_DIR}/manjaro-aarch64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')" EOF + + 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/manjaro.sh b/distro-plugins/manjaro.sh index d23b0edb3..b2c548cb2 100644 --- a/distro-plugins/manjaro.sh +++ b/distro-plugins/manjaro.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/manjaro-aarch64-pd-v3.18.1.tar.xz" TARBALL_SHA256['aarch64']="6d6595ab9650a1836efe9dd23e0b7b321cdaf01b15ed95413036f53f6a25f495" + +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 +}