From 29c260e85c4caaf5940312d7b3e06d415eeb6983 Mon Sep 17 00:00:00 2001 From: cschantz Date: Thu, 6 Nov 2025 16:00:50 -0500 Subject: [PATCH] Simplify installer execution - remove overly strict checks Removed the -x check that was failing despite file being executable. Changed to simple file existence and size validation instead. Back to direct execution (./ ) instead of bash wrapper. The file shows -rwxr-xr-x so it has execute permissions. The issue was the test itself, not the permissions. --- modules/backup/acronis-install.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/backup/acronis-install.sh b/modules/backup/acronis-install.sh index 2bbb87d..1b24ca9 100755 --- a/modules/backup/acronis-install.sh +++ b/modules/backup/acronis-install.sh @@ -254,18 +254,20 @@ fi echo "" # Make executable -if ! chmod +x "Cyber_Protection_Agent_for_Linux_x86_64.bin"; then - print_error "Failed to set executable permissions" +chmod +x "Cyber_Protection_Agent_for_Linux_x86_64.bin" 2>/dev/null + +# Verify file exists and has size +if [ ! -f "Cyber_Protection_Agent_for_Linux_x86_64.bin" ]; then + print_error "Installer file not found" cd / rm -rf "$TEMP_DIR" press_enter exit 1 fi -# Verify file is executable -if [ ! -x "Cyber_Protection_Agent_for_Linux_x86_64.bin" ]; then - print_error "Installer file is not executable" - ls -lh "Cyber_Protection_Agent_for_Linux_x86_64.bin" +file_size=$(stat -c%s "Cyber_Protection_Agent_for_Linux_x86_64.bin" 2>/dev/null || echo "0") +if [ "$file_size" -lt 1000000 ]; then + print_error "Installer file is too small (possibly corrupted)" cd / rm -rf "$TEMP_DIR" press_enter @@ -279,10 +281,10 @@ echo -e "${DIM}───────────────────── if [ -z "$INSTALL_FLAGS" ]; then # Interactive mode - run directly - bash ./Cyber_Protection_Agent_for_Linux_x86_64.bin + ./Cyber_Protection_Agent_for_Linux_x86_64.bin else - # Unattended mode - bash ./Cyber_Protection_Agent_for_Linux_x86_64.bin $INSTALL_FLAGS + # Unattended mode - need to pass flags properly + ./Cyber_Protection_Agent_for_Linux_x86_64.bin $INSTALL_FLAGS fi INSTALL_EXIT_CODE=$?