|
|
|
@ -394,6 +394,13 @@ os_check() {
|
|
|
|
|
# Extract dig response
|
|
|
|
|
response="${cmdResult%%$'\n'*}"
|
|
|
|
|
|
|
|
|
|
log_write "${INFO} dig return code: ${digReturnCode}"
|
|
|
|
|
log_write "${INFO} dig response: ${response}"
|
|
|
|
|
|
|
|
|
|
if [ "${response}" -ne 0 ]; then
|
|
|
|
|
log_write "${CROSS} Distro: ${COL_RED}${detected_os^}${COL_NC}"
|
|
|
|
|
log_write "${CROSS} Error: ${COL_RED}dig command failed - Unable to check OS${COL_NC}"
|
|
|
|
|
else
|
|
|
|
|
IFS=" " read -r -a supportedOS < <(echo "${response}" | tr -d '"')
|
|
|
|
|
for distro_and_versions in "${supportedOS[@]}"
|
|
|
|
|
do
|
|
|
|
@ -414,9 +421,6 @@ os_check() {
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
log_write "${INFO} dig return code: ${digReturnCode}"
|
|
|
|
|
log_write "${INFO} dig response: ${response}"
|
|
|
|
|
|
|
|
|
|
if [ "$valid_os" = true ]; then
|
|
|
|
|
log_write "${TICK} Distro: ${COL_GREEN}${detected_os^}${COL_NC}"
|
|
|
|
|
|
|
|
|
@ -430,6 +434,7 @@ os_check() {
|
|
|
|
|
log_write "${CROSS} Distro: ${COL_RED}${detected_os^}${COL_NC}"
|
|
|
|
|
log_write "${CROSS} Error: ${COL_RED}${detected_os^} is not a supported distro (${FAQ_HARDWARE_REQUIREMENTS})${COL_NC}"
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
diagnose_operating_system() {
|
|
|
|
|