While this release has some new features, they are all intended for development use

for the next major feature, -m / memory, so there is no particular reason to package
this release. There is a new development option, -! 33, which lets me override /sys
data use for -M, which is useful to debug dmidecode output for -m and other features.

No new version, new man. There may be a few more of these releases, but functionally
there is no particular reason to make a new package if you are a maintainer, so there
is no new version number. This release is a preparation for some branches/one/inxi
tests that will be run in the future.

The man/help document -! 33 just to have it there, but it should make no difference
to anyone but me at this stage.
This commit is contained in:
inxi-svn 2014-04-14 20:35:38 +00:00
parent 7e0535d4c2
commit 6a2a82c1bf
3 changed files with 64 additions and 12 deletions

46
inxi
View file

@ -75,6 +75,7 @@
#### xrandr (x11-xserver-utils)
#### -i - IP information, local/wan - ip (iproute) legacy, not used if ip present: ifconfig (net-tools)
#### -Ix - view current runlevel while not in X window system (or with -x): runlevel (sysvinit)
#### -m - all systems, dmidecode, unless someone can find a better way.
#### -M - for older systems whose kernel does not have /sys data for machine, dmidecode (dmidecode)
#### -o - for unmounted file system information in unmounted drives (root only default): file (file)
#### Note: requires user action for this feature to run as user (edit /etc/sudoers file)
@ -257,6 +258,7 @@ A_HDD_DATA=''
A_INIT_DATA=''
A_INTERFACES_DATA=''
A_MACHINE_DATA=''
A_MEMORY_DATA=''
A_NETWORK_DATA=''
A_OPTICAL_DRIVE_DATA=''
A_PARTITION_DATA=''
@ -286,6 +288,7 @@ B_DMIDECODE_SET='false'
B_EXTRA_DATA='false'
# triggered by -xx
B_EXTRA_EXTRA_DATA='false'
B_FORCE_DMIDECODE='false'
B_ID_SET='false'
# override certain errors due to currupted data
B_HANDLE_CORRUPT_DATA='false'
@ -333,6 +336,7 @@ B_SHOW_INFO='false'
B_SHOW_IP='false'
B_SHOW_LABELS='false'
B_SHOW_MACHINE='false'
B_SHOW_MEMORY='false'
B_SHOW_NETWORK='false'
# either -v > 3 or -P will show partitions
B_SHOW_PARTITIONS='false'
@ -1935,7 +1939,7 @@ check_recommends_items()
xrandr:x11-xserver-utils~xrandr~x11-server-utils~:-G_single_screen_resolution
'
local recommended_apps='
dmidecode:dmidecode~dmidecode~dmidecode~:-M_if_no_sys_machine_data
dmidecode:dmidecode~dmidecode~dmidecode~:-M_if_no_sys_machine_data;_-m_memory
file:file~file~file~:-o_unmounted_file_system
hddtemp:hddtemp~hddtemp~hddtemp~:-Dx_show_hdd_temp
ifconfig:net-tools~net-tools~net-tools~:-i_ip_lan-deprecated
@ -2185,7 +2189,7 @@ get_parameters()
# no need to run through these if there are no args
# reserved for future use: -g for extra Graphics; -m for extra Machine; -d for extra Disk
elif [[ -n $1 ]];then
while getopts Abc:CdDfFGhHiIlMnNopPrRsSt:uUv:V${weather_flag}xy:zZ%@:!: opt
while getopts Abc:CdDfFGhHiIlmMnNopPrRsSt:uUv:V${weather_flag}xy:zZ%@:!: opt
do
case $opt in
A) B_SHOW_AUDIO='true'
@ -2286,6 +2290,9 @@ get_parameters()
B_SHOW_PARTITIONS='true'
use_short='false'
;;
m) B_SHOW_MEMORY='true'
use_short='false'
;;
M) B_SHOW_MACHINE='true'
use_short='false'
;;
@ -2529,6 +2536,9 @@ get_parameters()
32)
B_SHOW_HOST='true'
;;
33)
B_FORCE_DMIDECODE='true'
;;
ftp*)
ALTERNATE_FTP="$OPTARG"
;;
@ -2615,7 +2625,7 @@ show_options()
network tool). Same as -Nni. Not shown with -F for user security reasons, you shouldn't paste your local/wan IP."
print_lines_basic "1" "-I" "Information: processes, uptime, memory, irc client (or shell type), $SCRIPT_NAME version."
print_lines_basic "1" "-l" "$partition_string_u labels. Default: short $partition_string -P. For full -p output, use: -pl (or -plu)."
print_lines_basic "1" "-M" "Machine data. Motherboard, Bios, and if present, System Builder (Like Lenovo). Older systems/kernels without the required /sys data can use dmidecode instead, run as root."
print_lines_basic "1" "-M" "Machine data. Motherboard, Bios, and if present, System Builder (Like Lenovo). Older systems/kernels without the required /sys data can use dmidecode instead, run as root. Dmidecode can be forced with -! 33"
print_lines_basic "1" "-n" "Advanced Network card information. Same as -Nn. Shows interface, speed, mac id, state, etc."
print_lines_basic "1" "-N" "Network card information. With -x, shows PCI BusID, Port number."
print_lines_basic "1" "-o" "Unmounted $partition_string information (includes UUID and LABEL if available). Shows file system type if you have file installed, if you are root OR if you have added to /etc/sudoers (sudo v. 1.7 or newer) Example:^<username>^ALL^=^NOPASSWD:^/usr/bin/file^"
@ -2708,6 +2718,7 @@ show_options()
print_screen_output "Advanced Options:"
print_lines_basic "1" "-! 31" "Turns off hostname in output. Useful if showing output from servers etc."
print_lines_basic "1" "-! 32" "Turns on hostname in output. Overrides global B_SHOW_HOST='false'"
print_lines_basic "1" "-! 33" "Forces use of dmidecode data instead of /sys where relevant (-M)."
if [[ $1 == 'full' ]];then
print_screen_output " "
@ -2723,9 +2734,10 @@ show_options()
print_lines_basic "1" "-! 14" "Triggers an update from svn branch four - if present, of course."
print_lines_basic "1" "-! 15" "Triggers an update from svn branch BSD - if present, of course."
print_lines_basic "1" "-! 16" "Triggers an update from svn branch GNUBSD - if present, of course."
print_lines_basic "1" "-! <http://......>" "Triggers an update from whatever server you list."
print_lines_basic "1" "-! " "<http://......> Triggers an update from whatever server you list."
print_lines_basic "1" "" "Example: inxi^-!^http://yourserver.com/testing/inxi"
fi
print_lines_basic "1" "-! <ftp.......>" "Changes debugging data ftp upload location to whatever you enter here. Only used together with -xx@^11-14, and must be used in front of that."
print_lines_basic "1" "-! " "<ftp.......> Changes debugging data ftp upload location to whatever you enter here. Only used together with -xx@^11-14, and must be used in front of that."
print_lines_basic "1" "" "Example: inxi^-!^ftp.yourserver.com/incoming^-xx@^14"
fi
print_screen_output " "
@ -4806,7 +4818,7 @@ get_dmidecode_data()
gsub(/'"$BAN_LIST_NORMAL"'/, "", twoData)
gsub(/,/, " ", $0)
# clean out Handle line
sub(/^Handle.*/,"", $0)
# sub(/^Handle.*/,"", $0)
sub(/^[[:space:]]*Inactive.*/,"",$0)
# yes, there is a typo in a user data set, unknow
# Base Board Version|Base Board Serial Number
@ -5877,7 +5889,7 @@ get_machine_data()
chassis_vendor chassis_type chassis_version chassis_serial
"
fi
if [[ -d $id_dir ]];then
if [[ -d $id_dir && $B_FORCE_DMIDECODE == 'false' ]];then
for id_file in $machine_files
do
file_data=''
@ -9095,12 +9107,12 @@ print_it_out()
if [[ $B_SHOW_MACHINE == 'true' ]];then
print_machine_data
fi
if [[ $B_SHOW_WEATHER == 'true' ]];then
print_weather_data
fi
if [[ $B_SHOW_BASIC_CPU == 'true' || $B_SHOW_CPU == 'true' ]];then
print_cpu_data
fi
if [[ $B_SHOW_MEMORY == 'true' ]];then
print_memory_data_placeholder
fi
if [[ $B_SHOW_GRAPHICS == 'true' ]];then
print_graphics_data
fi
@ -9131,6 +9143,9 @@ print_it_out()
if [[ $B_SHOW_PS_CPU_DATA == 'true' || $B_SHOW_PS_MEM_DATA == 'true' ]];then
print_ps_data
fi
if [[ $B_SHOW_WEATHER == 'true' ]];then
print_weather_data
fi
if [[ $B_SHOW_INFO == 'true' ]];then
print_info_data
fi
@ -10306,6 +10321,17 @@ print_machine_data()
eval $LOGFE
}
print_memory_data_placeholder()
{
eval $LOGFS
local memory_line="${C1}Placeholder$SEP3${C2} Feature not yet developed."
memory_line=$( create_print_line "Memory:" "$memory_line${CN}" )
print_screen_output "$memory_line"
eval $LOGFE
}
# args: $1 - module name (could be > 1, so loop it ); $2 - audio (optional)
print_module_version()
{

7
inxi.1
View file

@ -1,4 +1,4 @@
.TH INXI 1 "2014\-04\-03" inxi "inxi manual"
.TH INXI 1 "2014\-04\-14" inxi "inxi manual"
.SH NAME
inxi \- Command line system information script for console and IRC
.SH SYNOPSIS
@ -123,7 +123,7 @@ Show partition labels. Default: short partition \fB\-P\fR. For full \fB\-p\fR ou
.B \-M
Show machine data. Motherboard, Bios, and if present, System Builder (Like Lenovo).
Older systems/kernels without the required \fB/sys\fR data can use dmidecode instead, run as root. If using dmidecode,
may also show bios revision as well as version.
may also show bios revision as well as version. \fB\-! 33\fR can force use of \fBdmidecode\fR data instead of \fB/sys\fR.
.TP
.B \-n
Show Advanced Network card information. Same as \fB\-Nn\fR. Shows interface, speed,
@ -401,6 +401,9 @@ forums or IRC.
.TP
.B \-! 32
Turns on hostname in System line. Overrides inxi config file value (if set): B_SHOW_HOST='false'.
.TP
.B \-! 33
Force use of \fBdmidecode\fR. This will override \fB/sys\fR data in some lines, like \fB\-M\fR.
.SH DEBUGGING OPTIONS
.TP
.B \-%

View file

@ -1,3 +1,26 @@
=====================================================================================
Version: 2.1.20
Patch Version: 00
Script Date: 2014-04-08
-----------------------------------
Changes:
-----------------------------------
While this release has some new features, they are all intended for development use
for the next major feature, -m / memory, so there is no particular reason to package
this release. There is a new development option, -! 33, which lets me override /sys
data use for -M, which is useful to debug dmidecode output for -m and other features.
No new version, new man. There may be a few more of these releases, but functionally
there is no particular reason to make a new package if you are a maintainer, so there
is no new version number. This release is a preparation for some branches/one/inxi
tests that will be run in the future.
The man/help document -! 33 just to have it there, but it should make no difference
to anyone but me at this stage.
-----------------------------------
-- Harald Hope - Mon, 14 Apr 2014 13:31:24 -0700
=====================================================================================
Version: 2.1.20
Patch Version: 00