Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use /bin/bash as the default shell #1693

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docker/build_scripts/install-runtime-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
fi
elif [ "${BASE_POLICY}" == "musllinux" ]; then
TOOLCHAIN_DEPS="binutils gcc g++ gfortran"
BASETOOLS="${BASETOOLS} curl util-linux tar"
BASETOOLS="${BASETOOLS} curl util-linux shadow tar"
PACKAGE_MANAGER=apk
apk add --no-cache ca-certificates gnupg
else
Expand Down Expand Up @@ -137,4 +137,17 @@ if [ "${BASE_POLICY}" == "manylinux" ]; then
# c.f. https://github.com/pypa/manylinux/issues/1022
echo "/usr/local/lib" > /etc/ld.so.conf.d/00-manylinux.conf
ldconfig
else
if [ ! -f /etc/pam.d/chsh ]; then
cat <<EOF > /etc/pam.d/chsh
#%PAM-1.0
auth sufficient pam_rootok.so
auth sufficient pam_shells.so
account required pam_permit.so
password include base-password
EOF
fi
# set the default shell to bash
chsh -s /bin/bash root
useradd -D -s /bin/bash
fi
3 changes: 3 additions & 0 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,8 @@ if [ -L /usr/local/man ]; then
test -d /usr/local/man
fi

# check the default shell is /bin/bash
test "$SHELL" = "/bin/bash"

# final report
echo "run_tests successful!"