Remove login shell name suffix restriction

Some shells do not end with sh, consistent with the python bootstrap
implementation.
This commit is contained in:
pagedown 2022-03-11 15:42:45 +08:00
parent ea28951e0e
commit 72718cbab7
No known key found for this signature in database
GPG Key ID: E921CF18AC8FF6EB

View File

@ -275,10 +275,7 @@ if [ "$tty_ok" = "y" ]; then
fi
login_shell_is_ok() {
if [ -z "$login_shell" -o ! -x "$login_shell" ]; then return 1; fi
case "$login_shell" in
*sh) return 0;
esac
if [ -n "$login_shell" -a -x "$login_shell" ]; then return 0; fi
return 1
}