branch one, testing a zfs fix

This commit is contained in:
inxi-svn 2014-03-27 19:58:49 +00:00
parent d12c42e3cf
commit ddcb8b49a3

181
inxi
View file

@ -1,9 +1,9 @@
#!/usr/bin/env bash
########################################################################
#### Script Name: inxi
#### Version: 2.1.9
#### Date: 2014-03-24
#### Patch Number: 02-b1
#### Version: 2.1.11
#### Date: 2014-03-26
#### Patch Number: 01-b1
########################################################################
#### SPECIAL THANKS
########################################################################
@ -797,10 +797,6 @@ main()
# then create the output
print_it_out
## last steps
if [[ $B_IRC == 'false' && $SCHEME -gt 0 ]];then
echo -n ""
fi
eval $LOGFE
# weechat's executor plugin forced me to do this, and rightfully so, because else the exit code
# from the last command is taken..
@ -819,12 +815,12 @@ main()
initialize_data()
{
eval $LOGFS
BSD_VERSION=$( uname -s 2>/dev/null | tr '[A-Z]' '[a-z]' )
BSD_VERSION=$( uname -s 2>/dev/null )
BSD_VERSION=${BSD_VERSION,,}
# note: archbsd says they are a freebsd distro, so assuming it's the same as freebsd
if [[ -n $( grep 'bsd' <<< "$BSD_VERSION" ) ]];then
if [[ -z ${BSD_VERSION/*bsd*/} ]];then
# GNU/kfreebsd will by definition have GNU tools like sed/grep
if [[ -n $( grep 'kfreebsd' <<< "$BSD_VERSION" ) ]];then
if [[ -z ${BSD_VERSION/*kfreebsd*/} ]];then
BSD_TYPE='debian-bsd' # debian gnu bsd
else
BSD_TYPE='bsd' # all other bsds
@ -1106,6 +1102,11 @@ set_color_scheme()
C2="${!a_output_colors[1]}"
CN="${!a_output_colors[2]}"
# ((COLOR_SCHEME++)) ## note: why is this? ##
# handle some explicit colors that are used for no color 0
if [[ $SCHEME -eq 0 ]];then
NORMAL=''
RED=''
fi
eval $LOGFE
}
@ -1186,7 +1187,7 @@ select_default_color_scheme()
print_lines_basic "0" "" "Global overrides all individual color schemes. Individual schemes remove the global setting."
print_screen_output "$LINE1"
read user_selection
if [[ -n $( grep -Es '^([0-9]+)$' <<< "$user_selection" ) && $user_selection -lt $i ]];then
if [[ "$user_selection" =~ ^([0-9]+)$ && $user_selection -lt $i ]];then
case $COLOR_SELECTION in
irc)
config_variable='IRC_COLOR_SCHEME'
@ -1681,12 +1682,12 @@ debug_data_collector()
if [[ -e $FILE_XORG_LOG ]];then
cat $FILE_XORG_LOG &> $debug_data_dir/xorg-log-file.txt
else
touch $debug_data_dir/no-xorg-log-file
touch $debug_data_dir/xorg-log-file-absent
fi
if [[ -e /etc/X11/xorg.conf ]];then
cat /etc/X11/xorg.conf &> $debug_data_dir/xorg-conf.txt
else
touch $debug_data_dir/no-xorg-conf-file
touch $debug_data_dir/xorg-conf-file-absent
fi
if [[ -n $( ls /etc/X11/xorg.conf.d/ 2>/dev/null ) ]];then
ls /etc/X11/xorg.conf.d &> $debug_data_dir/ls-etc-x11-xorg-conf-d.txt
@ -1696,7 +1697,7 @@ debug_data_collector()
cat /etc/X11/xorg.conf.d/$xorg_file &> $debug_data_dir/xorg-conf-d-$xorg_file.txt
done
else
touch $debug_data_dir/no-xorg-conf-d-files
touch $debug_data_dir/xorg-conf-d-files-absent
fi
echo 'Collecting X, xprop, glxinfo, xrandr, xdpyinfo data...'
xprop -root &> $debug_data_dir/xprop_root.txt
@ -2161,7 +2162,7 @@ get_parameters()
B_SHOW_NETWORK='true'
B_SHOW_SYSTEM='true'
;;
c) if [[ -n $( grep -E '^[0-9][0-9]?$' <<< $OPTARG ) ]];then
c) if [[ $OPTARG =~ ^[0-9][0-9]?$ ]];then
case $OPTARG in
99)
B_RUN_COLOR_SELECTOR='true'
@ -2282,7 +2283,7 @@ get_parameters()
S) B_SHOW_SYSTEM='true'
use_short='false'
;;
t) if [[ -n $( grep -E '^(c|m|cm|mc)([1-9]|1[0-9]|20)?$' <<< $OPTARG ) ]];then
t) if [[ $OPTARG =~ ^(c|m|cm|mc)([1-9]|1[0-9]|20)?$ ]];then
use_short='false'
if [[ -n $( grep -E '[0-9]+' <<< $OPTARG ) ]];then
PS_COUNT=$( sed 's/[^0-9]//g' <<< $OPTARG )
@ -2301,7 +2302,7 @@ get_parameters()
B_SHOW_PARTITIONS='true'
use_short='false'
;;
v) if [[ -n $( grep -E "^[0-9][0-9]?$" <<< $OPTARG ) && $OPTARG -le $VERBOSITY_LEVELS ]];then
v) if [[ $OPTARG =~ ^[0-9][0-9]?$ && $OPTARG -le $VERBOSITY_LEVELS ]];then
if [[ $OPTARG -ge 1 ]];then
use_short='false'
B_SHOW_BASIC_CPU='true'
@ -3136,9 +3137,7 @@ get_irc_client_version()
esac
;;
gribble|limnoria|supybot)
IRC_CLIENT_VERSION=" $( $Irc_Client_Path --version | gawk 'NR == 1 {
print $2
}' )"
IRC_CLIENT_VERSION=" $( get_program_version 'supybot' '^Supybot' '2' )"
if [[ -n $IRC_CLIENT_VERSION ]];then
if [[ -n ${IRC_CLIENT_VERSION/*gribble*/} || $App_Working_Name == 'gribble' ]];then
IRC_CLIENT="Gribble"
@ -3220,10 +3219,12 @@ set_perl_python_client_data()
# OR via script shortcuts, both cases in fact now
if [[ $B_RUNNING_IN_DISPLAY == 'true' && -z ${Ps_aux_Data/*konversation*/} ]];then
IRC_CLIENT='Konversation'
version=$( get_de_app_version 'konversation' '^konversation' '2' )
version=$( get_program_version 'konversation' '^konversation' '2' )
B_CONSOLE_IRC='false'
## NOTE: supybot only appears in ps aux using 'SHELL' command; the 'CALL' command
## gives the user system irc priority, and you don't see supybot listed, so use SHELL
elif [[ $B_RUNNING_IN_DISPLAY == 'false' && -z ${Ps_aux_Data/*supybot*/} ]];then
version=$( get_de_app_version 'supybot' '^Supybot' '2' )
version=$( get_program_version 'supybot' '^Supybot' '2' )
if [[ -n $version ]];then
IRC_CLIENT_VERSION=" $version"
if [[ -z ${version/*gribble*/} ]];then
@ -4034,7 +4035,7 @@ get_desktop_environment()
elif [[ $KDE_FULL_SESSION == 'true' ]]; then
version_data=$( kded --version 2>/dev/null )
version=$( grep -si '^KDE:' <<< "$version_data" | gawk '{print $2}' )
# version=$( get_de_app_version 'kded' '^KDE:' '2' )
# version=$( get_program_version 'kded' '^KDE:' '2' )
if [[ -z $version ]];then
version='3.5'
fi
@ -4046,7 +4047,7 @@ get_desktop_environment()
fi
desktop_environment="KDE"
elif [[ $XDG_CURRENT_DESKTOP == 'Unity' ]];then
version=$( get_de_app_version 'unity' '^unity' '2' )
version=$( get_program_version 'unity' '^unity' '2' )
# not certain cinn will always have version, so keep output right if not
if [[ -n $version ]];then
version="$version "
@ -4069,7 +4070,7 @@ get_desktop_environment()
# eventually this needs to be better organized so all the xprop tests are in the same
# section, but this is good enough for now.
if [[ -n $xprop_root && -n $( grep -is '^_MUFFIN' <<< "$xprop_root" ) ]];then
version=$( get_de_app_version 'cinnamon' '^cinnamon' '2' )
version=$( get_program_version 'cinnamon' '^cinnamon' '2' )
# not certain cinn will always have version, so keep output right if not
if [[ -n $version ]];then
version="$version "
@ -4082,7 +4083,7 @@ get_desktop_environment()
fi
desktop_environment="Cinnamon"
elif [[ -n $xprop_root && -n $( grep -is '^_MARCO' <<< "$xprop_root" ) ]];then
version=$( get_de_app_version 'mate-about' '^MATE[[:space:]]DESKTOP' 'NF' )
version=$( get_program_version 'mate-about' '^MATE[[:space:]]DESKTOP' 'NF' )
# not certain cinn/mate will always have version, so keep output right if not
if [[ -n $version ]];then
version="$version "
@ -4098,9 +4099,9 @@ get_desktop_environment()
# https://bugzilla.gnome.org/show_bug.cgi?id=542880
elif [[ -n $GNOME_DESKTOP_SESSION_ID ]]; then
if type -p gnome-shell &>/dev/null;then
version=$( get_de_app_version 'gnome-shell' 'gnome' '3' )
version=$( get_program_version 'gnome-shell' 'gnome' '3' )
elif type -p gnome-about &>/dev/null;then
version=$( get_de_app_version 'gnome-about' 'gnome' '3' )
version=$( get_program_version 'gnome-about' 'gnome' '3' )
fi
if [[ $B_EXTRA_DATA == 'true' ]];then
toolkit=$( get_de_gtk_data )
@ -4117,16 +4118,16 @@ get_desktop_environment()
# String: "This is xfdesktop version 4.2.12"
# alternate: xfce4-about --version > xfce4-about 4.10.0 (Xfce 4.10)
if [[ -n $( grep -Eis '\"xfce4\"' <<< "$xprop_root" ) ]];then
version=$( get_de_app_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' )
version=$( get_program_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' )
# arch linux reports null, so use alternate if null
if [[ -z $version ]];then
version=$( get_de_app_version 'xfce4-panel' '^xfce4-panel' '2' )
version=$( get_program_version 'xfce4-panel' '^xfce4-panel' '2' )
if [[ -z $version ]];then
version='4'
fi
fi
if [[ $B_EXTRA_DATA == 'true' ]];then
toolkit=$( get_de_app_version 'xfdesktop' 'Built[[:space:]]with[[:space:]]GTK' '4' )
toolkit=$( get_program_version 'xfdesktop' 'Built[[:space:]]with[[:space:]]GTK' '4' )
if [[ -n $toolkit ]];then
version="$version (Gtk $toolkit)"
fi
@ -4134,16 +4135,16 @@ get_desktop_environment()
desktop_environment="Xfce"
# when 5 is released, the string may need updating
elif [[ -n $( grep -is '\"xfce5\"' <<< "$xprop_root" ) ]];then
version=$( get_de_app_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' )
version=$( get_program_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' )
# arch linux reports null, so use alternate if null
if [[ -z $version ]];then
version=$( get_de_app_version 'xfce5-panel' '^xfce5-panel' '2' )
version=$( get_program_version 'xfce5-panel' '^xfce5-panel' '2' )
if [[ -z $version ]];then
version='5'
fi
fi
if [[ $B_EXTRA_DATA == 'true' ]];then
toolkit=$( get_de_app_version 'xfdesktop' 'Built[[:space:]]with[[:space:]]GTK' '4' )
toolkit=$( get_program_version 'xfdesktop' 'Built[[:space:]]with[[:space:]]GTK' '4' )
if [[ -n $toolkit ]];then
version="$version (Gtk $toolkit)"
fi
@ -4151,14 +4152,14 @@ get_desktop_environment()
desktop_environment="Xfce"
elif [[ -n $( grep -is 'BLACKBOX_PID' <<< "$xprop_root" ) ]];then
if [[ -n $( grep -is 'fluxbox' <<< "$Ps_aux_Data" ) ]];then
version=$( get_de_app_version 'fluxbox' '^fluxbox' '2' )
version=$( get_program_version 'fluxbox' '^fluxbox' '2' )
desktop_environment='Fluxbox'
else
desktop_environment='Blackbox'
fi
elif [[ -n $( grep -is 'OPENBOX_PID' <<< "$xprop_root" ) ]];then
# note: openbox-lxde --version may be present, but returns openbox data
version=$( get_de_app_version 'openbox' '^openbox' '2' )
version=$( get_program_version 'openbox' '^openbox' '2' )
if [[ $XDG_CURRENT_DESKTOP == 'LXDE' || \
-n $( grep -is 'lxde' <<< "$Ps_aux_Data" ) ]];then
if [[ -n $version ]];then
@ -4174,7 +4175,7 @@ get_desktop_environment()
desktop_environment='Openbox'
fi
elif [[ -n $( grep -is 'ICEWM' <<< "$xprop_root" ) ]];then
version=$( get_de_app_version 'icewm' '^icewm' '2' )
version=$( get_program_version 'icewm' '^icewm' '2' )
desktop_environment='IceWM'
elif [[ -n $( grep -is 'ENLIGHTENMENT' <<< "$xprop_root" ) ]];then
# no -v or --version but version is in xprop -root
@ -4182,10 +4183,10 @@ get_desktop_environment()
version=$( grep -is 'ENLIGHTENMENT_VERSION' <<< "$xprop_root" | cut -d '"' -f 2 | gawk '{print $2}' )
desktop_environment='Enlightenment'
elif [[ -n $( grep -is '^I3_' <<< "$xprop_root" ) ]];then
version=$( get_de_app_version 'i3' '^i3' '3' )
version=$( get_program_version 'i3' '^i3' '3' )
desktop_environment='i3'
elif [[ -n $( grep -is 'WINDOWMAKER' <<< "$xprop_root" ) ]];then
version=$( get_de_app_version 'wmaker' '^Window[[:space:]]*Maker' 'NF' )
version=$( get_program_version 'wmaker' '^Window[[:space:]]*Maker' 'NF' )
if [[ -n $version ]];then
version="$version "
fi
@ -4193,14 +4194,14 @@ get_desktop_environment()
elif [[ -n $( grep -is '^_WM2' <<< "$xprop_root" ) ]];then
# note; there isn't actually a wm2 version available but error handling should cover it and return null
# maybe one day they will add it?
version=$( get_de_app_version 'wm2' '^wm2' 'NF' )
version=$( get_program_version 'wm2' '^wm2' 'NF' )
# not certain will always have version, so keep output right if not
if [[ -n $version ]];then
version="$version "
fi
desktop_environment="WM2"
elif [[ -n $( grep -is 'herbstluftwm' <<< "$xprop_root" ) ]];then
version=$( get_de_app_version 'herbstluftwm' '^herbstluftwm' 'NF' )
version=$( get_program_version 'herbstluftwm' '^herbstluftwm' 'NF' )
if [[ -n $version ]];then
version="$version "
fi
@ -4211,37 +4212,37 @@ get_desktop_environment()
# note that gawk is going to exit after first occurance of search string, so no need for extra
if [[ -z $desktop_environment ]];then
if [[ -n $( grep -is 'fvwm-crystal' <<< "$Ps_aux_Data" ) ]];then
version=$( get_de_app_version 'fvwm' '^fvwm' '2' )
version=$( get_program_version 'fvwm' '^fvwm' '2' )
desktop_environment='FVWM-Crystal'
elif [[ -n $( grep -is 'fvwm' <<< "$Ps_aux_Data" ) ]];then
version=$( get_de_app_version 'fvwm' '^fvwm' '2' )
version=$( get_program_version 'fvwm' '^fvwm' '2' )
desktop_environment='FVWM'
elif [[ -n $( grep -is 'pekwm' <<< "$Ps_aux_Data" ) ]];then
version=$( get_de_app_version 'pekwm' '^pekwm' '3' )
version=$( get_program_version 'pekwm' '^pekwm' '3' )
desktop_environment='pekwm'
elif [[ -n $( grep -is 'awesome' <<< "$Ps_aux_Data" ) ]];then
version=$( get_de_app_version 'awesome' '^awesome' '2' )
version=$( get_program_version 'awesome' '^awesome' '2' )
desktop_environment='Awesome'
elif [[ -n $( grep -is 'scrotwm' <<< "$Ps_aux_Data" ) ]];then
version=$( get_de_app_version 'scrotwm' '^welcome.*scrotwm' '4' )
version=$( get_program_version 'scrotwm' '^welcome.*scrotwm' '4' )
desktop_environment='Scrotwm' # no --version for this one
elif [[ -n $( grep -is 'spectrwm' <<< "$Ps_aux_Data" ) ]];then
version=$( get_de_app_version 'spectrwm' '^spectrwm.*welcome.*spectrwm' '5' )
version=$( get_program_version 'spectrwm' '^spectrwm.*welcome.*spectrwm' '5' )
desktop_environment='Spectrwm' # no --version for this one
elif [[ -n $( grep -Eis '([[:space:]]|/)twm' <<< "$Ps_aux_Data" ) ]];then
desktop_environment='Twm' # no --version for this one
elif [[ -n $( grep -Eis '([[:space:]]|/)dwm' <<< "$Ps_aux_Data" ) ]];then
version=$( get_de_app_version 'dwm' '^dwm' '1' )
version=$( get_program_version 'dwm' '^dwm' '1' )
desktop_environment='dwm'
elif [[ -n $( grep -is 'wmii2' <<< "$Ps_aux_Data" ) ]];then
version=$( get_de_app_version 'wmii2' '^wmii2' '1' )
version=$( get_program_version 'wmii2' '^wmii2' '1' )
desktop_environment='wmii2'
# note: in debian at least, wmii is actuall wmii3
elif [[ -n $( grep -is 'wmii' <<< "$Ps_aux_Data" ) ]];then
version=$( get_de_app_version 'wmii' '^wmii' '1' )
version=$( get_program_version 'wmii' '^wmii' '1' )
desktop_environment='wmii'
elif [[ -n $( grep -Eis '([[:space:]]|/)jwm' <<< "$Ps_aux_Data" ) ]];then
version=$( get_de_app_version 'jwm' '^jwm' '2' )
version=$( get_program_version 'jwm' '^jwm' '2' )
desktop_environment='JWM'
fi
fi
@ -4256,7 +4257,7 @@ get_desktop_environment()
# note: gawk doesn't support white spaces in search string, gave errors, so use [[:space:]] instead
# args: $1 - desktop/app command for --version; $2 - search string; $3 - gawk print number
get_de_app_version()
get_program_version()
{
local version_data='' version='' get_version='--version'
@ -5545,14 +5546,14 @@ get_hard_drive_data_advanced()
# this is handles the new /sys data types first
if [[ -e /sys/block/${a_temp_working[0]}/device/model ]];then
temp_name="$( remove_erroneous_chars /sys/block/${a_temp_working[0]}/device/model )"
temp_name=$( tr ' ' '_' <<< $temp_name | cut -d '-' -f 1 )
temp_name=$( cut -d '-' -f 1 <<< ${temp_name// /_} )
elif [[ ${#a_temp_scsi[@]} -gt 0 ]];then
for (( j=0; j < ${#a_temp_scsi[@]}; j++ ))
do
## ok, ok, it's incomprehensible, search /dev/disk/by-id for a line that contains the
# discovered disk name AND ends with the correct identifier, sdx
# get rid of whitespace for some drive names and ids, and extra data after - in name
temp_name=$( tr ' ' '_' <<< ${a_temp_scsi[$j]} | cut -d '-' -f 1 )
temp_name=$( cut -d '-' -f 1 <<< ${a_temp_scsi[$j]// /_} )
sd_ls_by_id=$( grep -Em1 ".*$temp_name.*${a_temp_working[0]}$" <<< "$ls_disk_by_id" )
if [[ -n $sd_ls_by_id ]];then
@ -5664,11 +5665,11 @@ get_init_data()
if [[ -e /proc/1/comm && -n $( grep -s 'systemd' /proc/1/comm ) ]];then
init_type='systemd'
if type -p systemd &>/dev/null;then
init_version=$( get_de_app_version 'systemd' '^systemd' '2' )
init_version=$( get_program_version 'systemd' '^systemd' '2' )
fi
if [[ -z $init_version ]];then
if type -p systemctl &>/dev/null;then
init_version=$( get_de_app_version 'systemctl' '^systemd' '2' )
init_version=$( get_program_version 'systemctl' '^systemd' '2' )
fi
fi
else
@ -5677,11 +5678,11 @@ get_init_data()
if [[ -n $( /sbin/init --version 2>/dev/null | grep 'upstart' ) ]];then
init_type='Upstart'
# /sbin/init --version == init (upstart 1.12.1)
init_version=$( get_de_app_version 'init' 'upstart' '3' )
init_version=$( get_program_version 'init' 'upstart' '3' )
elif type -p epoch &>/dev/null;then
init_type='Epoch'
# epoch version == Epoch Init System 1.0.1 "Sage"
init_version=$( get_de_app_version 'epoch' '^Epoch' '4' )
init_version=$( get_program_version 'epoch' '^Epoch' '4' )
# missing data:
# http://smarden.org/runit/sv.8.html
elif [[ -e /sbin/runit-init || -e /etc/runit || -n $( type -p sv ) ]];then
@ -5704,10 +5705,10 @@ get_init_data()
rc_type='OpenRC'
# /sbin/openrc --version == openrc (OpenRC) 0.13
if type -p openrc &>/dev/null;then
rc_version=$( get_de_app_version 'openrc' '^openrc' '3' )
rc_version=$( get_program_version 'openrc' '^openrc' '3' )
# /sbin/rc --version == rc (OpenRC) 0.11.8 (Gentoo Linux)
elif type -p rc &>/dev/null;then
rc_version=$( get_de_app_version 'rc' '^rc' '3' )
rc_version=$( get_program_version 'rc' '^rc' '3' )
fi
## assume sysvrc, but this data is too buggy and weird and inconsistent to have meaning
# leaving this off for now
@ -7612,13 +7613,20 @@ get_raid_data_bsd()
{
eval $LOGFS
local zpool_path=$( type -p zpool 2>/dev/null )
local zpool_data=''
local zpool_data='' zpool_arg='v'
if [[ -n $zpool_path ]];then
B_BSD_RAID='true'
# bsd sed does not support inserting a true \n so use this trick
zpool_data="$( $zpool_path list -v | sed $SED_RX 's/^([^[:space:]])/\
# some zfs does not have -v
if $zpool_path list -v &>/dev/null;then
zpool_data="$( $zpool_path list -v 2>/dev/null | sed $SED_RX 's/^([^[:space:]])/\
\1/' )"
else
zpool_data="$( $zpool_path list 2>/dev/null | sed $SED_RX 's/^([^[:space:]])/\
\1/' )"
zpool_arg='no-v'
fi
# echo "$zpool_data"
IFS=$'\n'
A_RAID_DATA=( $(
@ -7666,12 +7674,14 @@ get_raid_data_bsd()
print raidString
}' <<< "$zpool_data" ) )
IFS="$ORIGINAL_IFS"
get_raid_component_data_bsd
# pass the zpool type, so we know how to get the components
get_raid_component_data_bsd "$zpool_arg"
fi
eval $LOGFE
}
# note, we've already tested for zpool so no further tests required
# args: $1 - zpool type, v will have a single row output, no-v has stacked for components
get_raid_component_data_bsd()
{
eval $LOGFS
@ -7691,16 +7701,26 @@ get_raid_component_data_bsd()
zpool_status="$( zpool status $device )"
# we will remove ONLINE for status and only use OFFLINE/DEGRADED as tests
# for print output display of issues with components
# note: different zfs outputs vary, some have the components listed by line
for component in ${a_raid_data[3]}
do
component_status=$( gawk '
component_status=$( gawk -v zpoolType=$1 '
BEGIN {
IGNORECASE=1
separator=""
}
$1 ~ /^'$component'$/ {
sub( /ONLINE/, "", $2 )
print "'$component'" $2
exit
if ( zpoolType == "v" ) {
sub( /ONLINE/, "", $2 )
print "'$component'" $2
exit
elseif (zpoolType == "no-v" ) {
while (getline && !/^$/) {
component=component separator $1
separator=","
}
print "'$component'" component
}
}' <<< "$zpool_status" )
component_string="$component_string$separator$component_status"
separator=' '
@ -8347,24 +8367,24 @@ get_shell_data()
if [[ $B_EXTRA_DATA == 'true' && -n $shell_type ]];then
case $shell_type in
bash)
shell_version=$( get_de_app_version "$shell_type" "^GNU[[:space:]]bash,[[:space:]]version" "4" | \
shell_version=$( get_program_version "$shell_type" "^GNU[[:space:]]bash,[[:space:]]version" "4" | \
sed $SED_RX 's/(\(.*|-release|-version)//' )
;;
# csh/dash use dpkg package version data, debian/buntu only
csh)
shell_version=$( get_de_app_version "$shell_type" "^tcsh" "2" )
shell_version=$( get_program_version "$shell_type" "^tcsh" "2" )
;;
dash)
shell_version=$( get_de_app_version "$shell_type" "$shell_type" "3" )
shell_version=$( get_program_version "$shell_type" "$shell_type" "3" )
;;
ksh)
shell_version=$( get_de_app_version "$shell_type" "version" "5" )
shell_version=$( get_program_version "$shell_type" "version" "5" )
;;
tcsh)
shell_version=$( get_de_app_version "$shell_type" "^tcsh" "2" )
shell_version=$( get_program_version "$shell_type" "^tcsh" "2" )
;;
zsh)
shell_version=$( get_de_app_version "$shell_type" "^zsh" "2" )
shell_version=$( get_program_version "$shell_type" "^zsh" "2" )
;;
esac
fi
@ -9028,6 +9048,11 @@ print_it_out()
print_info_data
fi
fi
## last steps, clear any lingering colors
if [[ $B_IRC == 'false' && $SCHEME -gt 0 ]];then
echo -n ""
fi
eval $LOGFE
}
@ -9082,7 +9107,7 @@ print_short_data()
local cpu_clock="${a_cpu_working[1]}" # old CPU3
# this gets that weird min/max final array item, which almost never contains any data of use
local min_max_clock_nu=$(( ${#A_CPU_DATA[@]} - 1 ))
local min_max_clock=${A_CPU_DATA[$min_max_clock_nu]}
local min_max_clock=${A_CPU_DATA[$min_max_clock_nu]/.* Mhz/ Mhz}
# this handles the case of for example ARM cpus, which will not have data for
# min/max, since they don't have speed. Since that sets a flag, not found, just
# look for that and use the speed from the first array array, same where we got
@ -9162,7 +9187,7 @@ print_audio_data()
else
alsa_version='N/A'
fi
alsa_data="${C1}Sound$SEP3${C2} $alsa ${C1}v:$SEP3${C2} $alsa_version"
alsa_data="${C1}Sound$SEP3${C2} $alsa ${C1}v$SEP3${C2} $alsa_version"
IFS="$ORIGINAL_IFS"
fi
# note, error handling is done in the get function, so this will never be null, but
@ -9283,7 +9308,7 @@ print_cpu_data()
local cpc_plural='' cpu_count_print='' model_plural='' cpu_data_string=''
local cpu_physical_count='' cpu_core_count='' cpu_core_alpha='' cpu_type=''
local cpu_2_data='' working_cpu=''
local line_starter='' multi_cpu_starter="${C1}Clock Speeds$SEP3${C2} "
local line_starter="CPU:" multi_cpu_starter="${C1}Clock Speeds$SEP3${C2} "
##print_screen_output "A_CPU_DATA[0]=\"${A_CPU_DATA[0]}\""
# Array A_CPU_DATA always has one extra element: max clockfreq found.
@ -9322,7 +9347,7 @@ print_cpu_data()
cpu_count_print="$cpu_physical_count "
model_plural='s'
fi
line_starter="CPU$cpc_plural$SEP3"
line_starter="CPU$cpc_plural:"
cpu_data_string="$cpu_count_print$cpu_core_alpha core"
cpu_data="${C1}$cpu_data_string${C2} ${a_cpu_working[0]}$model_plural ($cpu_type)"
if [[ $B_SHOW_CPU == 'true' ]];then