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.
This commit is contained in:
@@ -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=$?
|
||||
|
||||
Reference in New Issue
Block a user