mirror of https://framagit.org/kyodev/kyopages.git
getInfo 2.31.2
This commit is contained in:
parent
9e87f2052c
commit
0c59e9508b
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
version=2.31.1
|
||||
version=2.31.2
|
||||
date="12/11/2017"
|
||||
projet="simpledeb"
|
||||
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
|
||||
|
@ -1219,7 +1219,7 @@ fi_nm(){ # 10/11/2017
|
|||
unset text
|
||||
}
|
||||
|
||||
fi_reseau(){ # 11/11/2017
|
||||
fi_reseau(){ # 12/11/2017
|
||||
local slots cards ip_a iwconfig interfaces route resolv canal_wifi ifx text pluriel
|
||||
local alert_wlx alert_ifconfig
|
||||
# cardsManuel="$(lspci -nnk | grep -EiA 5 'network|ethernet')"
|
||||
|
@ -1344,8 +1344,46 @@ fi_serial(){ # 06/11/2017
|
|||
unset text
|
||||
}
|
||||
|
||||
fi_sources(){ #v2 11/11/2017
|
||||
[ "$(f__cmd_exist dpkg)" ] || return 0
|
||||
fi_pkgmnt(){ #v1 12/11/2017
|
||||
[ "$pkg_mngr" ] || figet_packager
|
||||
[ "$pkg_mngr" ] && fi_dpkg || return 0
|
||||
}
|
||||
# , assigne $pkg_mngr (dpkg|pacman|pacman-g2|portage|rpm|n/a)
|
||||
figet_packager(){ #v1 12/11/2017
|
||||
# zypper (suse)
|
||||
# Rpm : Fedora, mageia (alternatif), dnf succède à yum, surcouche rpm
|
||||
# Pacman: Arch Linux, Frugalware, Chakra Linux, Manjaro, KaOS, Parbola, Antergos, Apricity
|
||||
# Portage: Gentoo Linux, Chrome OS, Sabayon, Funtoo Linux.
|
||||
# Debian, buntu apt/dpkg
|
||||
type -p dpkg &>/dev/null && pkg_mngr="dpkg"
|
||||
# Arch Linux
|
||||
type -p pacman &>/dev/null && pkg_mngr="pacman"
|
||||
# Frugalware
|
||||
type -p pacman-g2 &>/dev/null && pkg_mngr="pacman-g2"
|
||||
# Portage (emerge/ebuild)
|
||||
type -p emerge &>/dev/null && pkg_mngr="portage"
|
||||
# Fedora
|
||||
type -p rpm &>/dev/null && pkg_mngr="rpm"
|
||||
|
||||
[ "$fg_pkgs" ] || pkg_mngr="n/a"
|
||||
}
|
||||
|
||||
# nombre de paquets, assigne $fg_pkgs
|
||||
figet_packages() { #v1 12/11/2017
|
||||
# inutilisé pour l'instant
|
||||
# Debian, buntu apt/dpkg
|
||||
type -p dpkg &>/dev/null && fg_pkgs=$(dpkg -l | grep -c '^ii')
|
||||
# Arch Linux
|
||||
type -p pacman &>/dev/null && fg_pkgs="$(pacman -Qq --color never | wc -l)"
|
||||
# Frugalware
|
||||
type -p pacman-g2 &>/dev/null && fg_pkgs=$(pacman-g2 -Q | wc -l)
|
||||
# Portage (emerge/ebuild)
|
||||
type -p emerge &>/dev/null && fg_pkgs=$(ls -d /var/db/pkg/*/* | wc -l)
|
||||
# Fedora
|
||||
type -p rpm &>/dev/null && fg_pkgs=$(rpm -qa | wc -l)
|
||||
}
|
||||
|
||||
fi_dpkg(){ #v2 12/11/2017
|
||||
local sources dateMaj nb_packages upgrade upgrade_qte remove remove_qte non_ii_qte text pluriel
|
||||
local alert_httpredir alert_upgrade alert_full_upgrade alert_upgrade_titre
|
||||
local alert_remove alert_remove_titre alert_non_ii alert_non_ii_titre alert_non_ii_info
|
||||
|
@ -1372,7 +1410,7 @@ fi_sources(){ #v2 11/11/2017
|
|||
fi
|
||||
if [ "${upgrade_qte[1]}" -gt 0 ]; then # dist-upgrade #10 upgraded, 0 newly installed, 0 to remove and 0 not upgraded"
|
||||
[ "${upgrade_qte[1]}" -gt 1 ] && pluriel="s" || unset pluriel
|
||||
alert_full_upgrade="${upgrade_qte[1]} paquet"$pluriel" à mettre à jour avec (\`apt full-upgrade\`)"
|
||||
alert_full_upgrade="${upgrade_qte[1]} paquet"$pluriel" à mettre à jour avec \`apt full-upgrade\` (maj profonde)"
|
||||
fi
|
||||
printf "‣"
|
||||
# autoremove
|
||||
|
@ -1420,7 +1458,7 @@ fi_sources(){ #v2 11/11/2017
|
|||
fi
|
||||
fi
|
||||
###
|
||||
text="## gestion de paquets DPKG \n\n"
|
||||
text="## gestion de paquets dpkg \n\n"
|
||||
f_display "sources" "cmd" "grep -Ersv '^#|^$' /etc/apt/sources.list /etc/apt/sources.list.d/*.list"
|
||||
text+="* nombre de paquets installés: **$nb_packages** \n"
|
||||
text+="* dernière mise à jour apt: **$dateMaj** \n\n"
|
||||
|
@ -1472,7 +1510,7 @@ fi_system_analyse(){ # 08/11/2017
|
|||
unset text
|
||||
}
|
||||
|
||||
fi_systeme(){ # 11/11/2017
|
||||
fi_systeme(){ # 12/11/2017
|
||||
local mbr uname bootImage initDaemon xorg shells lastboot uptime charge pluriel text
|
||||
local alimentation alim_total ish ifs_origin ligne date_install
|
||||
local alert_SLiM alert_microcode microcode
|
||||
|
@ -1485,7 +1523,7 @@ fi_systeme(){ # 11/11/2017
|
|||
if [ -z "$xorg" ]; then
|
||||
[ "$(ps -ef | grep -c 'wayland')" -gt 1 ] && xorg="wayland" || xorg="indéterminé"
|
||||
fi
|
||||
for ish in $(f_grep_file "tests/shells" "file"); do
|
||||
for ish in $(f_grep_file "/etc/shells" "file"); do
|
||||
shells+=${ish##*/}" " # conservation dernier "champs", ifs '/'
|
||||
done
|
||||
shells=${shells%% } # suppression espace de fin
|
||||
|
@ -1559,7 +1597,7 @@ fi_systeme(){ # 11/11/2017
|
|||
text+="architecture système: $architecture \n"
|
||||
text+="uname: $uname \n"
|
||||
text+="$bootImage \n"
|
||||
text+="date d'installation: $date_install \n"
|
||||
text+="date d'installation (fiable?): $date_install \n"
|
||||
text+="démon d'initialisation: $initDaemon \n"
|
||||
text+="serveur d'affichage: $xorg \n"
|
||||
text+="nombre d'écrans: $fg_nb_screen \n"
|
||||
|
@ -2797,7 +2835,7 @@ prg_2(){ # traitements principaux
|
|||
fi
|
||||
if [[ "$1" == all || "$1" =~ c ]]; then #configuration #debian, packages -cc
|
||||
echo -e "# ▷ Configuration \n\n" >> "$fileOutput"
|
||||
for i in fi_locale fi_vrms fi_sources ; do
|
||||
for i in fi_locale fi_vrms fi_pkgmnt ; do
|
||||
$i
|
||||
printf "•"
|
||||
done
|
||||
|
@ -2941,7 +2979,7 @@ for j in $options; do
|
|||
case $j in
|
||||
-t | --test )
|
||||
prg_1 "$*"
|
||||
fi_systeme
|
||||
fi_pkgmnt
|
||||
exit ;; # test
|
||||
-c* | all )
|
||||
[ "$j" == "-c" ] && exec $0 "menu"
|
||||
|
|
|
@ -4,9 +4,10 @@
|
|||
* ! f__requis, fscript_install, f__scandir
|
||||
|
||||
|
||||
## 2.31.1 12/11/2017
|
||||
## 2.31.2 12/11/2017
|
||||
|
||||
fix: affichage alerte net-tools
|
||||
fix: localisation fichier shells correcte (et non test)
|
||||
|
||||
## 2.31.0 11/11/2017
|
||||
|
||||
|
|
Loading…
Reference in New Issue