getInfo 1.24.0

This commit is contained in:
kyodev 2017-09-24 06:27:21 +02:00
parent 75b96f7259
commit 50b8a4ee99
2 changed files with 28 additions and 10 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
version=1.23.0
date="23/09/2017"
version=1.24.0
date="24/09/2017"
projet="simpledeb"
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
script="getInfo"
@ -311,13 +311,10 @@ _vérifier la config resume_, l'UUID ne correspond pas à celui du swap. En cas
echo -e "$text" >> "$fileOutput"
}
fi_dmesg(){ # root only, si $1=dmesg rapport dmesg only # 22/09/2017
fi_dmesg(){ # root only, si $1=dmesg rapport dmesg only # 24/09/2017
local text dmesg_err dmesg_warn dmesg_crit
text="## dmesg (erreur, warning ou critique) \n\n"
if [ "$EUID" -ne 0 ]; then
if [ "$1" == "dmesg" ]; then
f__info "$RED""dmesg ne peut être affiché qu'avec les droits root"
fi
text+="ne peut être affiché qu'avec les droits root \n"
echo -e "$text" >> "$fileOutput"
return 0
@ -439,7 +436,7 @@ et/ou installer le démon Ntp: apt install ntp \n"
}
fi_nm(){ # 30/08/2017
[ -x "$(which nmcli)" ] || return 0 # root sur autre que debian?
[ -x "$(which nmcli)" ] || return 0 # nécessite root sur autre que debian?
local nm_etat nm_conf text
nm_etat="$(grep -vE '#|^$' /var/lib/NetworkManager/NetworkManager.state)"
nm_conf="$(grep -vE '#|^$' /etc/NetworkManager/NetworkManager.conf)"
@ -456,8 +453,8 @@ fi_nm(){ # 30/08/2017
echo -e "$text" >> "$fileOutput"
}
fi_nm_wifis(){ # 30/08/2017
[ -x "$(which nmcli)" ] && [ -z "$1" ] || return 0
fi_nm_wifis(){ # 24/09/2017
[ -x "$(which nmcli)" ] || return 0
local nm_wifis nm_connected text
nm_wifis="$(nmcli -f SSID,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,BARS,SECURITY device wifi list)"
nm_connected="$(LC_ALL=C nmcli -f SSID,ACTIVE,IN-USE device wifi list | grep -E 'yes[[:space:]]+\*' | awk '{print $1}')" # non utilisé
@ -470,6 +467,21 @@ fi_nm_wifis(){ # 30/08/2017
echo -e "$text" >> "$fileOutput"
}
fi_nonFree(){ # 24/09/2017
local vrmsOut text
if [ "$(which vrms)" ]; then
vrmsOut="$(vrms)"
else
vrmsOut="les paquets non-free ou contrib ne peuvent être détectés sans l'installation de vrms"
fi
###
text="## Paquets non-libres \n\n"
[ "$(which vrms)" ] && text+='```\n'
text+="$vrmsOut \n"
[ "$(which vrms)" ] && text+='```\n'
echo -e "$text" >> "$fileOutput"
}
fi_reseau(){ # 23/09/2017
local slotNetCards netCards ip_a iwconfig interfaces route resolv text liste_canaux_wifi
# netCards="$(lspci -nnk | grep -iEA 5 'network|ethernet')"
@ -1221,7 +1233,8 @@ prg_2(){ # traitements principaux
fi_nm_wifis; printf "." # si network manager, wifi proximité
fi_usb; printf "."
fi_system_analyse; printf "."
fi_dmesg; printf ".\n\n"
fi_dmesg; printf "."
fi_nonFree; printf ".\n\n"
}
prg_3(){ # fin de traitements
echo -e "--- \n" >> "$fileOutput"

View File

@ -6,6 +6,11 @@
* placé ln dans /usr/local/bin au lieu de /usr/bin ?
## 1.24.0 24/09/2017
* ménage fi_dmesg, fi_nm_wifis
* nouveau fi_nonFree
## 1.23.0 23/09/2017
* f__requis, f__info, f__error unset/for