getInfo 2.7.0

This commit is contained in:
kyodev 2017-10-16 21:23:23 +02:00
parent 1581c89d10
commit b9a275b0e6
2 changed files with 13 additions and 9 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
version=2.6.4
date="15/10/2017"
version=2.7.0
date="16/10/2017"
projet="simpledeb"
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
script="getInfo"
@ -952,7 +952,7 @@ fi_usb(){ # 25/09/2017
}
# informations batterie(s), assigne $fget_batt_nb $fget_batt
figet_batt(){ # 14/10/2017
figet_batt(){ # 16/10/2017
local batt_detail batt_nb batt_alim batt_unit batt_capa_design batt_capa_full batt_capa_now batt_conso
local batt_volt_min batt_volt_now batt_status batt_cycle batt_sn alert_batt_alarm
local batt_sante batt_restant tempo batRep ibat uevent
@ -1013,9 +1013,9 @@ figet_batt(){ # 14/10/2017
batt_conso="$(printf "%'d" $batt_conso)"
# sortie
batt_detail+="$ibat: $(cat $batRep/$ibat/manufacturer 2>/dev/null) "
batt_detail+="$(cat $batRep/$ibat/model_name 2>/dev/null) $(cat $batRep/$ibat/technology 2>/dev/null) "
batt_detail+="($(cat $batRep/$ibat/model_name 2>/dev/null)) $(cat $batRep/$ibat/technology 2>/dev/null) "
batt_detail+="$batt_capa_design$batt_unit - $batt_volt_min""V / $batt_volt_now""V (mini/actuel)"
[ "$batt_batt_sn" ] && batt_detail+="n° série: $batt_sn "
[ "$batt_sn" ] && batt_detail+="n° série: $batt_sn "
[ "$batt_cycle" != "0" ] && batt_detail+="$batt_cycle cycles"$' \n' || batt_detail+=$' \n'
[ "$batt_capa_full" ] && batt_detail+="pleine charge effective: $batt_capa_full$batt_unit, "
batt_detail+="pleine charge théorique: $batt_capa_design$batt_unit => "
@ -1348,11 +1348,10 @@ figet_hw_test(){ # 13/10/2017
# assigne $ip_local, $gateways, $gateways_type, $gateway, $gateway_type, $if_prioritaire
# $ip_local, $ip_local_type, $ifnames, $ifnames_type, $mac_address, mac_address_type
figet_ip(){ # 12/10/2017
figet_ip(){ # 16/10/2017
local ifn
[ -z "$(which ip)" ] && return 1
# ip_local="$(sed '/lo.*inet/d; /inet6.*scope global/d' <<< "$(ip -o a)" | gawk '{print " ",$4,"(",$2,")"}')"
ip_local="$(sed '/lo.*inet/d; /inet6.*scope/d' <<< "$(ip -o a)" | gawk '{print " ",$4,"(",$2,")"}')"
ip_local="$(sed '/[[:digit:]]:[[:blank:]]lo.*inet/d; /inet6.*scope/d' <<< $(ip -o a) | gawk '{print " ",$4,"(",$2,")"}')"
ip_local_type="$(sed -E 's/(^.*wl.*)/\1 (wifi)/;s/(^.*en.*|^.*eth.*)/\1 (ethernet)/' <<< $ip_local)"
gateways="$(LC_ALL=C ip -4 route | gawk '/default via/ {print " ",$3,"(",$5,")"}')"
gateways+="$(LC_ALL=C ip -6 route | gawk '/default via/ {print " ",$3,"(",$5,")"}')"

View File

@ -9,14 +9,19 @@
* réseau réviser
* bug temp cpu (neofetch)
* f__requis, si debian, proposer install via sudo?
* f_requis, erreur reportée dans rapport.md
---
* fix: figet_ip, ip local wlo
## 2.6.5 15/10/2017
## 2.7.0 16/10/2017
* révision f__scandir, requis "strings>binutils" dans fonction pour utiliser le script principal en dehors
des --debug-*
* mineur f__error f__info f__requis f__wget_test
* fix: figet_batt, n° de série
* fix: figet_ip, erreur possible entre lo/certain ifn
## 2.6.4 15/10/2017