[PR #21] [MERGED] V2.1.6 - Bug fixes, username support, and validation improvements #21

Closed
opened 2026-03-03 01:17:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/coelacant1/ProxmoxScripts/pull/21
Author: @coelacant1
Created: 11/25/2025
Status: Merged
Merged: 11/25/2025
Merged by: @coelacant1

Base: mainHead: testing


📝 Commits (1)

  • d36fbc4 V2.1.6 - Bug fixes, username support, and validation improvements

📊 Changes

13 files changed (+356 additions, -91 deletions)

View changed files

📝 .check/VerifySourceCalls.py (+33 -13)
📝 .check/_RunChecks.sh (+27 -0)
📝 .gitignore (+1 -0)
.site/MultiView.png (+0 -0)
.site/MultiView2.png (+0 -0)
📝 CHANGELOG.md (+62 -0)
📝 GUI.sh (+146 -22)
📝 Host/HostInfo.sh (+0 -3)
📝 README.md (+9 -5)
📝 Utilities/ConfigManager.sh (+25 -7)
📝 Utilities/RemoteExecutor.sh (+45 -36)
📝 Utilities/_Utilities.md (+6 -5)
📝 nodes.json.template (+2 -0)

📄 Description


name: Bug fixes, username support, and validation improvements
about: Bug fixes, username support, and validation improvements
title: "[PR] Bug fixes, username support, and validation improvements"
labels: enhancement, bug
assignees: 'Coela'

Added

  • Username Configuration - Support for specifying SSH usernames per node
    • Added username field to nodes.json configuration
    • Username prompts in all node configuration flows (manual entry, saved nodes, IP ranges, VMID ranges)
    • Default username is "root" with option to specify alternatives
    • Display format changed to username@ip throughout GUI
  • Dependency Checking - Runtime validation before remote execution
    • __check_remote_dependencies__() function checks for sshpass and jq
    • Helpful error messages with installation commands for all major distros
    • Notes that sshpass is not required when using SSH keys
  • Syntax Validation - Basic shell syntax checking added to validation suite
    • New Check 1a. in _RunChecks.sh runs bash -n on all .sh files
    • Catches structural errors and orphaned code blocks
    • Shows file names and line numbers for syntax errors
  • Enhanced Source Verification - Improved validation of shellcheck directives
    • VerifySourceCalls.py now validates shellcheck comments have matching source statements
    • Detects orphaned shellcheck directives within 5 lines
    • Prevents mismatched documentation and code

Changed

  • Remote Execution UI - Scripts hidden in remote mode for better UX
    • GUI.sh and CCPVE.sh hidden from root menu when in remote execution mode
    • Prevents accidental execution of control scripts on remote nodes
    • Scripts still shown in local mode and subdirectories
  • README.md - Clarified dependency requirements
    • Updated installation command to include jq and sshpass
    • Documented that sshpass is only needed for password-based authentication
    • Separated build-time tools from runtime dependencies

Fixed

  • Critical: Orphaned Error Handler - Fixed syntax error in Host/HostInfo.sh
    • Removed orphaned error handler code block (lines 34-36)
    • File had error message without matching source statement
    • Bug prevented script execution on remote nodes
  • Username Hardcoding - Removed hardcoded "root@" from all remote operations
    • Updated all SSH/SCP operations in RemoteExecutor.sh to use configured username
    • __ssh_exec__, __scp_exec__, __scp_exec_recursive__, __scp_download__ now accept username parameter
    • ConfigManager.sh tracks username per node in NODE_USERNAMES associative array
  • Missing Validation - Syntax check gap closed
    • _RunChecks.sh never validated basic syntax :C
    • Now catches structural errors that bash -n would detect
    • Prevents orphaned code and malformed control structures from entering repository

Technical Details

  • nodes.json.template - Added username field with "root" default
  • Utilities/ConfigManager.sh - Added NODE_USERNAMES tracking and get_node_username() function
  • Utilities/RemoteExecutor.sh - All remote operations parameterized with username
  • GUI.sh - Dependency checking, username prompts, and script filtering
  • .check/VerifySourceCalls.py - Enhanced shellcheck directive validation
  • .check/_RunChecks.sh - Added Check 1a. for syntax validation

Developer Notes

The orphaned error handler bug existed because:

  • bash -n syntax check was not being run in validation suite
  • DeadCodeCheck.py only checks unused functions/variables, not code structure
  • VerifySourceCalls.py didn't validate orphaned error handlers The fix adds syntax validation to prevent similar issues...

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature that would break existing functionality)
  • Documentation update
  • Other (please describe):

How Has This Been Tested?

Validated all _RunChecks.

Checklist

  • I have performed a self-review of my own code.
  • I have commented my code where necessary.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes do not generate new warnings or errors.
  • I have tested this code.

https://github.com/coelacant1/ProxmoxScripts/issues/20#issue-3662966025


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/coelacant1/ProxmoxScripts/pull/21 **Author:** [@coelacant1](https://github.com/coelacant1) **Created:** 11/25/2025 **Status:** ✅ Merged **Merged:** 11/25/2025 **Merged by:** [@coelacant1](https://github.com/coelacant1) **Base:** `main` ← **Head:** `testing` --- ### 📝 Commits (1) - [`d36fbc4`](https://github.com/coelacant1/ProxmoxScripts/commit/d36fbc4a4d126fb2bdc2e55365ef3112397d18bc) V2.1.6 - Bug fixes, username support, and validation improvements ### 📊 Changes **13 files changed** (+356 additions, -91 deletions) <details> <summary>View changed files</summary> 📝 `.check/VerifySourceCalls.py` (+33 -13) 📝 `.check/_RunChecks.sh` (+27 -0) 📝 `.gitignore` (+1 -0) ➕ `.site/MultiView.png` (+0 -0) ➕ `.site/MultiView2.png` (+0 -0) 📝 `CHANGELOG.md` (+62 -0) 📝 `GUI.sh` (+146 -22) 📝 `Host/HostInfo.sh` (+0 -3) 📝 `README.md` (+9 -5) 📝 `Utilities/ConfigManager.sh` (+25 -7) 📝 `Utilities/RemoteExecutor.sh` (+45 -36) 📝 `Utilities/_Utilities.md` (+6 -5) 📝 `nodes.json.template` (+2 -0) </details> ### 📄 Description --- name: Bug fixes, username support, and validation improvements about: Bug fixes, username support, and validation improvements title: "[PR] Bug fixes, username support, and validation improvements" labels: enhancement, bug assignees: 'Coela' --- ### Added - **Username Configuration** - Support for specifying SSH usernames per node - Added `username` field to nodes.json configuration - Username prompts in all node configuration flows (manual entry, saved nodes, IP ranges, VMID ranges) - Default username is "root" with option to specify alternatives - Display format changed to `username@ip` throughout GUI - **Dependency Checking** - Runtime validation before remote execution - `__check_remote_dependencies__()` function checks for sshpass and jq - Helpful error messages with installation commands for all major distros - Notes that sshpass is not required when using SSH keys - **Syntax Validation** - Basic shell syntax checking added to validation suite - New Check 1a. in `_RunChecks.sh` runs `bash -n` on all .sh files - Catches structural errors and orphaned code blocks - Shows file names and line numbers for syntax errors - **Enhanced Source Verification** - Improved validation of shellcheck directives - `VerifySourceCalls.py` now validates shellcheck comments have matching source statements - Detects orphaned shellcheck directives within 5 lines - Prevents mismatched documentation and code ### Changed - **Remote Execution UI** - Scripts hidden in remote mode for better UX - GUI.sh and CCPVE.sh hidden from root menu when in remote execution mode - Prevents accidental execution of control scripts on remote nodes - Scripts still shown in local mode and subdirectories - **README.md** - Clarified dependency requirements - Updated installation command to include `jq` and `sshpass` - Documented that sshpass is only needed for password-based authentication - Separated build-time tools from runtime dependencies ### Fixed - **Critical: Orphaned Error Handler** - Fixed syntax error in `Host/HostInfo.sh` - Removed orphaned error handler code block (lines 34-36) - File had error message without matching source statement - Bug prevented script execution on remote nodes - **Username Hardcoding** - Removed hardcoded "root@" from all remote operations - Updated all SSH/SCP operations in `RemoteExecutor.sh` to use configured username - `__ssh_exec__`, `__scp_exec__`, `__scp_exec_recursive__`, `__scp_download__` now accept username parameter - `ConfigManager.sh` tracks username per node in `NODE_USERNAMES` associative array - **Missing Validation** - Syntax check gap closed - `_RunChecks.sh` never validated basic syntax :C - Now catches structural errors that bash -n would detect - Prevents orphaned code and malformed control structures from entering repository ### Technical Details - `nodes.json.template` - Added username field with "root" default - `Utilities/ConfigManager.sh` - Added NODE_USERNAMES tracking and __get_node_username__() function - `Utilities/RemoteExecutor.sh` - All remote operations parameterized with username - `GUI.sh` - Dependency checking, username prompts, and script filtering - `.check/VerifySourceCalls.py` - Enhanced shellcheck directive validation - `.check/_RunChecks.sh` - Added Check 1a. for syntax validation ### Developer Notes The orphaned error handler bug existed because: - `bash -n` syntax check was not being run in validation suite - `DeadCodeCheck.py` only checks unused functions/variables, not code structure - `VerifySourceCalls.py` didn't validate orphaned error handlers The fix adds syntax validation to prevent similar issues... ## Type of Change - [x] Bug fix (non-breaking change fixing an issue) - [x] New feature (non-breaking change adding functionality) - [ ] Breaking change (fix or feature that would break existing functionality) - [ ] Documentation update - [ ] Other (please describe): ## How Has This Been Tested? Validated all _RunChecks. ## Checklist - [x] I have performed a self-review of my own code. - [x] I have commented my code where necessary. - [x] I have made corresponding changes to the documentation (if applicable). - [x] My changes do not generate new warnings or errors. - [x] I have tested this code. ## Related Issues https://github.com/coelacant1/ProxmoxScripts/issues/20#issue-3662966025 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 01:17:25 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxScripts#21
No description provided.