diff --git a/install.sh b/install.sh index a2ad54cd2..3f7edc84a 100755 --- a/install.sh +++ b/install.sh @@ -302,10 +302,11 @@ CT=() # Camera Type array - what to display in whiptail get_connected_cameras() { - local CMD CC MSG NUM_RPI=0 NUM_ZWO=0 + local CMD CMD_RET CC MSG NUM_RPI=0 NUM_ZWO=0 # true == ignore errors. ${CMD} will be "" if no command found. CMD="$( determineCommandToUse "false" "" "true" 2> /dev/null )" + CMD_RET=$? # return of 2 means no command was found setup_rpi_supported_cameras "${CMD}" # Will create full file is CMD == "" # RPi format: RPi \t camera_number \t camera_sensor [\t optional_other_stuff] @@ -358,7 +359,12 @@ get_connected_cameras() whiptail --title "${TITLE}" --msgbox "${MSG}" 12 "${WT_WIDTH}" 3>&1 1>&2 2>&3 MSG="No connected cameras were detected." - display_msg --log error "${MSG}" + local MSG2="" + if [[ ${CMD_RET} -eq 2 ]]; then + MSG2="No command to take RPi images was found" + MSG2+=" - make sure 'libcamera-apps' is installed if you have an RPi camera." + fi + display_msg --log error "${MSG}" "${MSG2}" exit_installation 1 "${STATUS_NO_CAMERA}" "" fi