diff --git a/inxi b/inxi index aba9790..ab0aada 100755 --- a/inxi +++ b/inxi @@ -1612,10 +1612,15 @@ debug_data_collector() echo 'Collecting system info: sensors, lsusb, lspci, lspci -v data, plus /proc data' echo 'also checking for dmidecode data: note, you must be root to have dmidecode work.' echo "Data going into: $SCRIPT_DATA_DIR/$debug_data_dir" - # bsd tools + # bsd tools http://cb.vu/unixtoolbox.xhtml + pciconf -l -cv &> $debug_data_dir/bsd-pciconf-cvl.txt pciconf -vl &> $debug_data_dir/bsd-pciconf-vl.txt + pciconf -l &> $debug_data_dir/bsd-pciconf-l.txt sysctl -a &> $debug_data_dir/bsd-sysctl-a.txt - + usbdevs -v &> $debug_data_dir/bsd-usbdevs-v.txt + kldstat &> $debug_data_dir/bsd-kldstat.txt + # diskinfo -v + # fdisk dmidecode &> $debug_data_dir/dmidecode.txt lscpu &> $debug_data_dir/lscpu.txt @@ -5953,11 +5958,29 @@ get_kernel_compiler_version() if [[ -n $compiler_version ]];then compiler_type='gcc' fi - elif [[ $BSD_TYPE == 'darwin-bsd' ]];then - if type -p gcc &>/dev/null;then - compiler_version=$( get_program_version 'gcc' 'Apple[[:space:]]LLVM' '4' ) - if [[ -n $compiler_version ]];then - compiler_type='LLVM' + else + if [[ $BSD_TYPE == 'darwin-bsd' ]];then + if type -p gcc &>/dev/null;then + compiler_version=$( get_program_version 'gcc' 'Apple[[:space:]]LLVM' '4' ) + if [[ -n $compiler_version ]];then + compiler_type='LLVM' + fi + fi + else + if [[ -f /etc/src.conf ]];then + compiler_type=$( grep '^CC' /etc/src.conf | cut -d '=' -f 2 ) + elif [[ -f /etc/make.conf ]];then + compiler_type=$( grep '^CC' /etc/make.conf | cut -d '=' -f 2 ) + fi + if [[ -n $compiler_type ]];then + if type -p $compiler_type &>/dev/null;then + if [[ $compiler_type == 'gcc' ]];then + compiler_version=$( get_program_version 'gcc' '^gcc' '3' ) + elif [[ $compiler_type == 'clang' ]];then + # FreeBSD clang version 3.0 (tags/RELEASE_30/final 145349) 20111210 + compiler_version=$( get_program_version 'clang' 'clang' '4' ) + fi + fi fi fi fi