Skip to content

Commit

Permalink
archlinux: ensure that /etc/environment always read
Browse files Browse the repository at this point in the history
Adjust PAM configuration
  • Loading branch information
sylirre committed Oct 25, 2023
1 parent d2717d7 commit 6cd6f32
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions distro-build/archlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,13 @@ write_plugin() {
TARBALL_URL['x86_64']="${GIT_RELEASE_URL}/archlinux-x86_64-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['x86_64']="$(sha256sum "${ROOTFS_DIR}/archlinux-x86_64-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
}
8 changes: 8 additions & 0 deletions distro-plugins/archlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ TARBALL_URL['i686']="https://github.com/termux/proot-distro/releases/download/v3
TARBALL_SHA256['i686']=""
TARBALL_URL['x86_64']="https://github.com/termux/proot-distro/releases/download/v3.10.0/archlinux-x86_64-pd-v3.10.0.tar.xz"
TARBALL_SHA256['x86_64']=""

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
}

0 comments on commit 6cd6f32

Please sign in to comment.