"Your **default** shell is currently not set to Bash" #99

Closed
opened 2026-02-04 16:36:39 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @itsthejb on GitHub (Nov 24, 2024).

Please verify that you have read and understood the guidelines.

yes

A clear and concise description of the issue.

Hi everyone,

First of all, let me take the opportunity to pay my respect to tteck, and thanks to everyone here for taking on this great project 🙇

Quite a minor one from me: as you are probably aware, the scripts enforce being executed under Bash, otherwise they will exit with:

✗ Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell.

However, what seems to me to be a little user-unfriendly is that it seems to be necessary to use chsh to switch the default shell (as per the message) to bash before proceeding. Surely it should be possible to maintain the Bash requirement, but only require the user to run under Bash beforehand? Requiring the default shell is quite inconvenient for those using other defaults. Currently:

  • Run script; exits with error
  • chsh -s /bin/bash root
  • Run script again - works
  • chsh -s <previous default> root

What seems more reasonable is just to check the current shell. So now it would be:

  • Run script; exits with error
  • bash
  • Run script again - works. No config restore required

This seems possible and less intrusive.

Hope you can help!

What settings are you currently utilizing?

  • Default Settings
  • Advanced Settings

Which Linux distribution are you employing?

Debian 12

If relevant, including screenshots or a code block can be helpful in clarifying the issue.

No response

Please provide detailed steps to reproduce the issue.

  • chsh -s <some other shell> root
  • Run script; exits with error
Originally created by @itsthejb on GitHub (Nov 24, 2024). ### Please verify that you have read and understood the guidelines. yes ### A clear and concise description of the issue. Hi everyone, First of all, let me take the opportunity to pay my respect to tteck, and thanks to everyone here for taking on this great project 🙇 Quite a minor one from me: as you are probably aware, the scripts enforce being executed under Bash, otherwise they will exit with: ``` ✗ Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell. ``` However, what seems to me to be a little user-unfriendly is that it seems to be necessary to use `chsh` to switch the default shell (as per the message) to `bash` before proceeding. Surely it should be possible to maintain the Bash requirement, but only require the user to run under Bash beforehand? Requiring the default shell is quite inconvenient for those using other defaults. Currently: - Run script; exits with error - `chsh -s /bin/bash root` - Run script again - works - `chsh -s <previous default> root` What seems more reasonable is just to check the current shell. So now it would be: - Run script; exits with error - `bash` - Run script again - works. No config restore required This seems possible and less intrusive. Hope you can help! ### What settings are you currently utilizing? - [X] Default Settings - [ ] Advanced Settings ### Which Linux distribution are you employing? Debian 12 ### If relevant, including screenshots or a code block can be helpful in clarifying the issue. _No response_ ### Please provide detailed steps to reproduce the issue. - `chsh -s <some other shell> root` - Run script; exits with error
OVERLORD added the not a script issuewontdo labels 2026-02-04 16:36:39 +03:00
Author
Owner

@Mellowlynx commented on GitHub (Nov 24, 2024):

We need to have a standard that we adhere to, and test with.
Bash is the default, as it's mostly the Linux default. If you choose to switch, it's up to you to work around this.
Most use bash, and this ensures, us, that the scripts behave the way we expect them to.

@Mellowlynx commented on GitHub (Nov 24, 2024): We need to have a standard that we adhere to, and test with. Bash is the default, as it's mostly the Linux default. If you choose to switch, it's up to you to work around this. Most use bash, and this ensures, us, that the scripts behave the way we expect them to.
Author
Owner

@itsthejb commented on GitHub (Nov 24, 2024):

Sure, I understand that. What I'm suggesting is, it's possible to just check that the currently active shell is Bash. I'll do a quick PR and you can see what you think

Edit: https://github.com/community-scripts/ProxmoxVE/pull/491

@itsthejb commented on GitHub (Nov 24, 2024): Sure, I understand that. What I'm suggesting is, it's possible to just check that the currently active shell is Bash. I'll do a quick PR and you can see what you think Edit: https://github.com/community-scripts/ProxmoxVE/pull/491
Author
Owner

@havardthom commented on GitHub (Nov 24, 2024):

Why Bash is required as default shell is discussed in this thread https://github.com/tteck/Proxmox/discussions/2536#discussion-6251444.
Specifically this comment https://github.com/tteck/Proxmox/discussions/2536#discussioncomment-8562395 mentions that simply invoking scripts with bash is not good enough if the script relies on Bash-specific features or behaviors. This can/has caused issues that are difficult to troubleshoot.

@havardthom commented on GitHub (Nov 24, 2024): Why Bash is required as default shell is discussed in this thread https://github.com/tteck/Proxmox/discussions/2536#discussion-6251444. Specifically this comment https://github.com/tteck/Proxmox/discussions/2536#discussioncomment-8562395 mentions that simply invoking scripts with bash is not good enough if the script relies on Bash-specific features or behaviors. This can/has caused issues that are difficult to troubleshoot.
Author
Owner

@itsthejb commented on GitHub (Nov 24, 2024):

Alright, then. So be it

@itsthejb commented on GitHub (Nov 24, 2024): Alright, then. So be it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#99