[PR #491] Use $BASH rather than $SHELL to check for Bash as active shell, instead of as default shell #2558

Closed
opened 2025-11-20 05:30:37 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/community-scripts/ProxmoxVE/pull/491

State: closed
Merged: No


Description

To $BASH env var is set when Bash is the active shell. This is in contrast to $SHELL, which points to the user's default shell. For cases where the user's default shell isn't Bash, this allows for running the script using Bash, rather than requiring the user to change their default shell (using chsh) first.

Fixes #476

Type of change

Please check the relevant option(s):

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (a fix or feature that would cause existing functionality to change unexpectedly)
  • New script (a fully functional and thoroughly tested script or set of scripts.)

Prerequisites

The following efforts must be made for the PR to be considered. Please check when completed:

  • Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions)
  • Testing performed (I have tested my changes, ensuring everything works as expected)
  • Documentation updated (I have updated any relevant documentation)
**Original Pull Request:** https://github.com/community-scripts/ProxmoxVE/pull/491 **State:** closed **Merged:** No --- ## Description To `$BASH` env var is set when Bash is the active shell. This is in contrast to `$SHELL`, which points to the user's default shell. For cases where the user's default shell isn't Bash, this allows for running the script using Bash, rather than requiring the user to change their default shell (using `chsh`) first. Fixes #476 ## Type of change Please check the relevant option(s): - [ ] Bug fix (non-breaking change that resolves an issue) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (a fix or feature that would cause existing functionality to change unexpectedly) - [ ] New script (a fully functional and thoroughly tested script or set of scripts.) ## Prerequisites The following efforts must be made for the PR to be considered. Please check when completed: - [x] Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions) - [x] Testing performed (I have tested my changes, ensuring everything works as expected) - [ ] Documentation updated (I have updated any relevant documentation)
saavagebueno added the pull-request label 2025-11-20 05:30:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#2558