Skip to content

Commit

Permalink
feat: use /bin/bash as the default shell (#1693)
Browse files Browse the repository at this point in the history
* feat: use /bin/bash as the default shell

* fix musllinux_1_1
  • Loading branch information
mayeut authored Oct 16, 2024
1 parent 3ab9635 commit b03a7ca
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
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!"

0 comments on commit b03a7ca

Please sign in to comment.