From 2d99ddd7d4cb9cb566d13607cba54aae5fbef588 Mon Sep 17 00:00:00 2001 From: Jakob-OSX Date: Wed, 6 May 2020 16:56:10 -0400 Subject: [PATCH] Fixed relative pathing to absolute pathing for MegaCli64 MegaCli64 could not be found nor executed due to relative pathing. This commit changes the relative path of MegaCli64 to an absolute path. I used this fixed version and it flashed correctly. Flashed successfully on H310 mini in a R720 server with a fresh Ubuntu Live 18.04.4 LTS. --- flash-it.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flash-it.sh b/flash-it.sh index a7c5aa6..741fb18 100644 --- a/flash-it.sh +++ b/flash-it.sh @@ -102,9 +102,9 @@ if [ ! -f "${MEGACLI_FILE_NAME}" ]; then fi # Display SAS address and dump to file -opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -a${ADAPTER_INDEX} | grep SAS\ Address +/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -a${ADAPTER_INDEX} | grep SAS\ Address BACKUP_SAS_ADDRESS_FILE="$(find ${BACKUP_ROOT_DIR} -name sas_address.txt)" -SAS_ADDRESS="$(opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -a${ADAPTER_INDEX} | grep -E 'SAS Address[^:]*:\W*(\w+)' | cut -d':' -f2 | cut -d' ' -f2)" +SAS_ADDRESS="$(/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -a${ADAPTER_INDEX} | grep -E 'SAS Address[^:]*:\W*(\w+)' | cut -d':' -f2 | cut -d' ' -f2)" if [ ${#SAS_ADDRESS} -ne 16 ]; then echo "Could not retrieve SAS address from MegaCli, attempting to load from existing backup file." [ ! -f "${BACKUP_SAS_ADDRESS_FILE}" ] && echo "Error: unable to locate SAS address backup file. No changes have been made." && exit 1