diff --git a/inxi b/inxi index de6b538..d5cbd98 100755 --- a/inxi +++ b/inxi @@ -1712,6 +1712,7 @@ debug_data_collector() lspci -mmnnv &> $debug_data_dir/lspci-mmnnv.txt lspci -v &> $debug_data_dir/lspci-v.txt lsusb &> $debug_data_dir/lsusb.txt + ls /sys &> $debug_data_dir/ls-sys.txt ps aux &> $debug_data_dir/ps-aux.txt runlevel &> $debug_data_dir/runlevel.txt systemctl list-units &> $debug_data_dir/systemctl-list-units.txt @@ -2028,11 +2029,18 @@ check_recommends_user_output() echo check_recommends_items 'downloaders' - echo 'Test Six: System Directories for Various Information.' - print_lines_basic "0" "" "If one of these directories is missing, $SCRIPT_NAME will have incomplete output:" + echo 'Test Six: System Directories for Various Information.' + echo '(Unless otherwise noted, these are for GNU/Linux systems)' + print_lines_basic "0" "" "If one of these directories is missing, $SCRIPT_NAME may have incomplete output:" echo check_recommends_items 'system-dirs' + echo 'Test Seven: System Files for Various Information.' + echo '(Unless otherwise noted, these are for GNU/Linux systems)' + print_lines_basic "0" "" "If one of these files is missing, $SCRIPT_NAME may have incomplete output:" + echo + check_recommends_items 'system-files' + echo 'All tests completed.' } # args: $1 - check item @@ -2088,8 +2096,22 @@ check_recommends_items() /dev:-l,-u,-o,-p,-P,-D_disk_partition_data /dev/disk/by-label:-l,-o,-p,-P_partition_labels /dev/disk/by-uuid:-u,-o,-p,-P_partition_uuid - /var/run/dmesg.boot:-C,-f_(BSD_only) ' + local recommended_files=" + $FILE_ASOUND_DEVICE:-A_sound_card_data + $FILE_ASOUND_VERSION:-A_ALSA_data + $FILE_CPUINFO:-C_cpu_data + $FILE_LSB_RELEASE:-S_distro_version_data_[deprecated] + $FILE_MDSTAT:-R_mdraid_data + $FILE_MEMINFO:-I_memory_data + $FILE_OS_RELEASE:-S_distro_version_data + $FILE_PARTITIONS:-p,-P_partitions_data + $FILE_MODULES:-G_module_data + $FILE_MOUNTS:-P,-p_partition_advanced_data + $FILE_DMESG_BOOT:-D,-d_disk_data_[BSD_only] + $FILE_SCSI:-D_Advanced_hard_disk_data_[used_rarely] + $FILE_XORG_LOG:-G_graphics_driver_load_status + " if [[ -n $COLS_INNER ]];then if [[ $COLS_INNER -ge 90 ]];then @@ -2142,6 +2164,13 @@ check_recommends_items() missing_string='system directories' type='directories' ;; + system-files) + item_list=$recommended_files + item_string='System file' + item_string='' + missing_string='system files' + type='files' + ;; esac # great trick from: http://ideatrash.net/2011/01/bash-string-padding-with-sed.html # left pad: sed -e :a -e 's/^.\{1,80\}$/& /;ta' @@ -2177,7 +2206,7 @@ check_recommends_items() fi starter="$( sed -e :a -e 's/^.\{1,'$width'\}$/&./;ta' <<< $print_string )" - if [[ -z $( grep '^/' <<< $application ) && -n $location ]] || [[ -d $application ]];then + if [[ -z $( grep '^/' <<< $application ) && -n $location ]] || [[ -d $application || -f $application ]];then if [[ -n $location ]];then finisher=" $location" else @@ -2206,8 +2235,10 @@ check_recommends_items() echo "Application: $application" print_lines_basic "0" "" "To add to your system, install the proper distribution package for your system:" print_lines_basic "0" "" "Debian/Ubuntu:^$package_deb^:: Arch Linux:^$package_pacman^:: Redhat/Fedora/Suse:^$package_rpm" - else + elif [[ $type == 'directories' ]];then echo "Directory: $application" + elif [[ $type == 'files' ]];then + echo "File: $application" fi done if [[ $item_string == 'System directory' ]];then