mirror of https://framagit.org/kyodev/kyopages.git
getInfo 2.69.0
This commit is contained in:
parent
eeda99e251
commit
59ab8e2e74
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
version=2.68.1
|
||||
date="17/12/2017"
|
||||
version=2.69.0
|
||||
date="18/12/2017"
|
||||
projet="simpledeb"
|
||||
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
|
||||
script="getInfo"
|
||||
|
@ -654,12 +654,13 @@ f_search_ko(){ # 13/12/2017
|
|||
}
|
||||
|
||||
# [$1=silent], assigne fe_nb_audio, fe_cards_audio
|
||||
fi_audio(){ # 16/12/2017
|
||||
fi_audio(){ # 18/12/2017
|
||||
local cardsAudio cmd_cards version_alsa card_alsa cmd_card_alsa cmt_card_alsa pluriel text
|
||||
local mod_alsa cmd_mod_alsa cmt_mod_alsa modAudio cmd_modAudio cmt_modAudio
|
||||
local alert_alsa
|
||||
|
||||
x_audio=1
|
||||
fe_nb_audio=0
|
||||
# devices
|
||||
fe_cards_audio=$( figet_lspci "audio" "name" )
|
||||
fe_cards_audio=$( f_lifting "$fe_cards_audio" )
|
||||
|
@ -727,10 +728,11 @@ fi_batt(){ # 14/12/2017
|
|||
}
|
||||
|
||||
# [$1=silent], assigne $fe_nb_bluez, $fe_cards_bluez
|
||||
fi_bluez(){ # 14/12/2017
|
||||
fi_bluez(){ # 18/12/2017
|
||||
local bluez cmd_bluez cmt_bluez mod cmd_mod cmt_mod pluriel text
|
||||
|
||||
x_bluez=1
|
||||
fe_nb_bluez=0
|
||||
if hcitool scan &>/dev/null && [[ $( f__which hciconfig ) ]]; then
|
||||
fe_nb_bluez=$( hciconfig name 2>/dev/null )
|
||||
fe_cards_bluez=$( grep -Eo '^hci[0-9]+' <<< $fe_nb_bluez )
|
||||
|
@ -1000,7 +1002,7 @@ fi_efi(){ # 6/12/2017
|
|||
}
|
||||
|
||||
# [$1=silent|xorgOnly], assigne $fe_gpu (liste des gpu), $fe_nb_gpu, fe_Xorg
|
||||
fi_gpu(){ # 16/12/2017
|
||||
fi_gpu(){ # 18/12/2017
|
||||
local cards cmd_cards prefixCmd openGl pluriel text
|
||||
local stck_glxinfo glx_dvc cmd_glx_dvc stck_glxinfoOpt stck_glxinfoDri glx_dvc_temp
|
||||
local cmd_openGl resolutions cmd_resolutions cmt_resolutions providers cmd_providers
|
||||
|
@ -1010,6 +1012,7 @@ fi_gpu(){ # 16/12/2017
|
|||
local toScrut confs ifile fileConfs cmd_confs cmt_confs
|
||||
|
||||
x_gpu=1
|
||||
fe_nb_gpu=0
|
||||
# liste/description gpu et qte
|
||||
fe_gpu=$( figet_lspci "video" "name")
|
||||
fe_gpu=${fe_gpu/VGA compatible controller: }
|
||||
|
@ -1378,17 +1381,18 @@ fi_locale(){ # 10/12/2017
|
|||
}
|
||||
|
||||
# [$1=notitre]
|
||||
fi_log_xorg(){ # 3/12/2017
|
||||
fi_log_xorg(){ # 18/12/2017
|
||||
local toScrut xfile xfileTest="" logXorg cmd_logXorg="" cmt_logXorg extract dateFile text nb_lignes=50
|
||||
local info_logs
|
||||
|
||||
[[ "$ENV_SSH" || "$ENV_DISPLAY" ]] && return 0
|
||||
(( x_dm == 1 )) || figet_dm
|
||||
toScrut=(
|
||||
/var/log/Xorg.0.log
|
||||
/home/$fu_user/.local/share/xorg/Xorg.0.log
|
||||
/var/lib/gdm3/.local/share/xorg/Xorg.0.log
|
||||
)
|
||||
# checkpoint
|
||||
|
||||
[[ "${fg_dm,,}" =~ gdm ]] && toScrut=( ${toScrut[@]} "/var/lib/gdm3/.local/share/xorg/Xorg.0.log" )
|
||||
for xfile in ${toScrut[@]}; do
|
||||
[ -e "$xfile" ] && xfileTest+="y"
|
||||
done
|
||||
|
@ -1440,11 +1444,12 @@ fi_mem(){ # 5/12/2017
|
|||
}
|
||||
|
||||
# [$1=silent], assigne fe_nb_reseau, fe_cards_reseau
|
||||
fi_net(){ # 16/12/2017 ( matériel )
|
||||
fi_net(){ # 18/12/2017 ( matériel )
|
||||
local cards cmd_cards modEth cmd_modEth cmt_modEth modWln cmd_modWln cmt_modWln pluriel text
|
||||
local alert_wlx
|
||||
|
||||
x_net=1
|
||||
fe_nb_reseau=0
|
||||
# devices
|
||||
fe_cards_reseau=$( figet_lspci "net" "name" ) # noms des cartes réseau détectées, mix ethernet/wifi
|
||||
fe_cards_reseau=${fe_cards_reseau/Network controller: /Network :}
|
||||
|
@ -1630,7 +1635,7 @@ fi_pkg_apt(){ #v3 12/12/2017
|
|||
dateMaj=$( date -r /var/cache/apt/pkgcache.bin '+%d/%m/%Y %H:%M %z' 2>/dev/null) || \
|
||||
dateMaj=$( date -r /var/cache/apt '+%d/%m/%Y %H:%M %z' 2>/dev/null ) # /var/lib/dpkg/
|
||||
nb_packages=$( dpkg -l | grep -c '^ii' )
|
||||
#nb_packages alternatif grep -c '\.list' <<< $(ls -1 /var/lib/dpkg/info/*.list)
|
||||
#nb_packages alternatif: grep -c '\.list' <<< $(ls -1 /var/lib/dpkg/info/*.list)
|
||||
# https
|
||||
apt_version=$( apt --version ) # apt 1.4.8 (i386)
|
||||
apt_version=${apt_version#apt } # 1.4.8 (i386)
|
||||
|
@ -2317,15 +2322,16 @@ fi_system_analyse(){ #v 2/12/2017
|
|||
}
|
||||
|
||||
# [$1=silent], assigne $fe_touchpad, fe_nb_touchpad
|
||||
fi_touchpad(){ # 14/12/2017
|
||||
fi_touchpad(){ # 18/12/2017
|
||||
local device cmd_device toScrut xfile file_logs type type_pt pilote cmd_pilote cmt_pilote info_driver
|
||||
|
||||
x_touchpad=1
|
||||
device=$( grep -Ei -B1 -A8 'synap|alps|etps|elan' /proc/bus/input/devices ) || return 0
|
||||
fe_nb_touchpad=0
|
||||
device=$( grep -Ei -B1 -A8 'synaptics|alps|etps|elan' /proc/bus/input/devices ) || return 0
|
||||
fe_touchpad=$( grep -i 'Name=' <<< $device )
|
||||
fe_touchpad=${fe_touchpad#*Name=\"} # suppression début
|
||||
fe_touchpad=${fe_touchpad%\"} # suppression fin
|
||||
cmd_device="grep -Ei -B1 -A8 'synap|alps|etps|elan' /proc/bus/input/devices"
|
||||
cmd_device="grep -Ei -B1 -A8 'synaptics|alps|etps|elan' /proc/bus/input/devices"
|
||||
# recherche Xorg.log
|
||||
toScrut=(
|
||||
/var/log/Xorg.0.log
|
||||
|
@ -2354,9 +2360,10 @@ fi_touchpad(){ # 14/12/2017
|
|||
if [ "$ENV_DEBIAN" ]; then
|
||||
pilote=$( gawk '
|
||||
/^ii/ { printf "%-30s", $2; $1=$2=$3=$4=""; print $0 }
|
||||
' <<< $( dpkg -l *synaptics *libinput ) )
|
||||
' <<< $( dpkg -l | grep -E 'synaptics|libinput' ) 2>/dev/null)
|
||||
# ' <<< $( dpkg -l *synaptics *libinput ) 2>/dev/null)
|
||||
cmd_pilote="dpkg -l *synaptics *libinput"
|
||||
cmt_pilote="drivers installé"
|
||||
cmt_pilote="paquets installés"
|
||||
info_driver="consulter d'éventuels fichiers *synaptics *libinput dans /etc/X11/xorg.conf.d/ "
|
||||
info_driver+="pour voir les configurations personnalisées"
|
||||
fi
|
||||
|
@ -2574,10 +2581,12 @@ figet_batt(){ #v2 15/12/2017
|
|||
}
|
||||
|
||||
# assigne $fg_cpu (description cpu), fg_nb_threads, $fg_cpu_arch, $fg_uarch, $fg_vendor=AMD|Intel, $fg_nb_cpu
|
||||
figet_cpu(){ #v 15/12/2017
|
||||
figet_cpu(){ #v 18/12/2017
|
||||
local cpuinfo speedNom speedMax speedMin speedCpu descrCpu cpu1 cpu2 cpu3
|
||||
|
||||
x_cpu=1
|
||||
fg_nb_threads=0
|
||||
fg_nb_cpu=0
|
||||
cpuinfo="$(cat /proc/cpuinfo)"
|
||||
# speed
|
||||
speedNom=$( gawk -F ':' '
|
||||
|
@ -3095,11 +3104,12 @@ figet_de(){ #v 14/12/2017 # thanks neofetch
|
|||
# $fg_disk_part_fixe_m, $fg_disk_part_amov_m : liste partitions montées, fixes ou amovibles
|
||||
# $fg_disk_part_swap : liste partitions swap
|
||||
# $fg_disk_part_fixe_nm, $fg_disk_part_amov_nm : liste partitions non montées, fixes ou amovibles
|
||||
figet_disk(){ #v2 14/12/2017
|
||||
figet_disk(){ #v2 18/12/2017
|
||||
local size type list_id idisk lsblk vendor model rev serial
|
||||
unset fg_disk_fixe fg_disk_amov
|
||||
|
||||
x_disk=1
|
||||
fg_nb_disk=0
|
||||
# bug printf: caractères accentués diminuent 1 caractère sur arguments suivants, ajouter autant d'espaces
|
||||
fg_disk_table="$(printf '%-5s %-8s %-6s %-10s %-18s %-6s' "disk" "taille" "type" "vendeur" "modèle" " rév.")"$'\n'
|
||||
fg_disk_serial="$(printf '%-5s %-10s %-18s %-6s %-24s %s' "disk" "vendeur" "modèle " " rév." " n° série")"$'\n'
|
||||
|
@ -3565,7 +3575,7 @@ figet_lspci(){ # 17/12/2017
|
|||
if [ "$1" = "audio" ]; then
|
||||
motif="Audio device|Audio controller|Multimedia audio controller"
|
||||
elif [ "$1" = "video" ]; then
|
||||
motif="VGA .* controller|Display controller|3D controller|Graphic" # |multimedia
|
||||
motif="VGA .* controller|Display controller|3D controller" # |multimedia|Graphic
|
||||
elif [ "$1" = "net" ]; then
|
||||
motif="Ethernet controller|Network controller"
|
||||
elif [ "$1" = "ethernet" ]; then
|
||||
|
@ -3737,10 +3747,10 @@ figet_modules(){ # 14/12/2017
|
|||
}
|
||||
|
||||
# assigne $fg_nb_screen, $fg_resolution. return fg_resolution=n/a[ (ssh)] & fg_nb_screen=n/a ou valeurs
|
||||
figet_screen(){ #v2 14/12/2017
|
||||
figet_screen(){ #v2 18/12/2017
|
||||
|
||||
x_screen=1
|
||||
fg_nb_screen="n/a"
|
||||
fg_nb_screen=0
|
||||
fg_resolution="n/a"
|
||||
[ "$ENV_DISPLAY" ] && fg_resolution+=":no Display"
|
||||
[ "$ENV_SSH" ] && fg_resolution+=":ssh"
|
||||
|
@ -4302,7 +4312,7 @@ for j in $options; do
|
|||
ORIGIN='test'
|
||||
prg_1 "$*"
|
||||
echo -n "•"
|
||||
fi_usb
|
||||
fi_log_xorg
|
||||
echo; f_prnt_md "$fileOutput"
|
||||
exit ;; # test
|
||||
-c* | all )
|
||||
|
|
|
@ -2,9 +2,17 @@
|
|||
|
||||
f__architecture
|
||||
|
||||
## getInfo 2.68.0 17/12/2017
|
||||
|
||||
## getInfo 2.69.0 18/12/2017
|
||||
|
||||
* révision: log xorg, pas de recherche dans gdm3 si dm n'est pas gdm
|
||||
* révision: général initialisation variable numérique
|
||||
* fix: nombre de touchpad
|
||||
|
||||
## getInfo 2.68.1 17/12/2017
|
||||
|
||||
* révision: affichage usb
|
||||
* fix: figet_lspci, détection carte video
|
||||
|
||||
## getInfo 2.67.0 16/12/2017
|
||||
|
||||
|
|
Loading…
Reference in New Issue