mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
dmidecode output cleanup, for dev memory stuff.
This commit is contained in:
parent
3c75f53521
commit
9ceb7b8cb1
13
inxi
13
inxi
|
@ -4828,6 +4828,7 @@ get_dmidecode_data()
|
||||||
# strip out starting white space so that the following stuff will clear properly
|
# strip out starting white space so that the following stuff will clear properly
|
||||||
sub(/^[[:space:]]+/, "", twoData)
|
sub(/^[[:space:]]+/, "", twoData)
|
||||||
sub(/^Base Board .*|^Chassis .*|.*O\.E\.M\..*|.*OEM.*|^Not .*|^System .*|.*unknow.*|.*N\/A.*|none|^To be filled.*/, "", twoData)
|
sub(/^Base Board .*|^Chassis .*|.*O\.E\.M\..*|.*OEM.*|^Not .*|^System .*|.*unknow.*|.*N\/A.*|none|^To be filled.*/, "", twoData)
|
||||||
|
sub(/(AssetTagNum|Manufacturer| Or Motherboard|PartNum|SerNum).*/, "", twoData)
|
||||||
gsub(/bios|acpi/, "", twoData)
|
gsub(/bios|acpi/, "", twoData)
|
||||||
sub(/http:\/\/www.abit.com.tw\//, "Abit", twoData)
|
sub(/http:\/\/www.abit.com.tw\//, "Abit", twoData)
|
||||||
|
|
||||||
|
@ -10293,7 +10294,8 @@ print_machine_data()
|
||||||
system_line="${C2}$sysDmiNull"
|
system_line="${C2}$sysDmiNull"
|
||||||
fi
|
fi
|
||||||
# patch to dump all of above if dmidecode was data source and non root user
|
# patch to dump all of above if dmidecode was data source and non root user
|
||||||
if [[ ${A_MACHINE_DATA[0]} == 'dmidecode-non-root-user' || ${A_MACHINE_DATA[0]} == 'dmidecode-no-smbios-dmi-data' ]];then
|
if [[ ${A_MACHINE_DATA[0]} == 'dmidecode-non-root-user' || \
|
||||||
|
${A_MACHINE_DATA[0]} == 'dmidecode-no-smbios-dmi-data' ]];then
|
||||||
if [[ ${A_MACHINE_DATA[0]} == 'dmidecode-non-root-user' ]];then
|
if [[ ${A_MACHINE_DATA[0]} == 'dmidecode-non-root-user' ]];then
|
||||||
system_line="${C2}${sysDmiError}dmidecode: you must be root to run dmidecode"
|
system_line="${C2}${sysDmiError}dmidecode: you must be root to run dmidecode"
|
||||||
elif [[ ${A_MACHINE_DATA[0]} == 'dmidecode-no-smbios-dmi-data' ]];then
|
elif [[ ${A_MACHINE_DATA[0]} == 'dmidecode-no-smbios-dmi-data' ]];then
|
||||||
|
@ -10329,6 +10331,15 @@ print_memory_data()
|
||||||
memory_line=$( create_print_line "Memory:" "$memory_line${CN}" )
|
memory_line=$( create_print_line "Memory:" "$memory_line${CN}" )
|
||||||
print_screen_output "$memory_line"
|
print_screen_output "$memory_line"
|
||||||
|
|
||||||
|
if [[ ${A_MEMORY_DATA[0]} == 'dmidecode-non-root-user' || \
|
||||||
|
${A_MEMORY_DATA[0]} == 'dmidecode-no-smbios-dmi-data' ]];then
|
||||||
|
if [[ ${A_MEMORY_DATA[0]} == 'dmidecode-non-root-user' ]];then
|
||||||
|
memory_line="${C2}${sysDmiError}dmidecode: you must be root to run dmidecode"
|
||||||
|
elif [[ ${A_MEMORY_DATA[0]} == 'dmidecode-no-smbios-dmi-data' ]];then
|
||||||
|
memory_line="${C2}${sysDmiError}dmidecode: no machine data available"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
eval $LOGFE
|
eval $LOGFE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue