premier réel commit
This commit is contained in:
parent
4115c39de8
commit
3f7e47d0b0
20
SOURCES/Lalis.desktop
Normal file
20
SOURCES/Lalis.desktop
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Comment[fr_FR]=
|
||||||
|
Comment=
|
||||||
|
Exec=/usr/bin/lalistunnel
|
||||||
|
GenericName[fr_FR]=
|
||||||
|
GenericName=
|
||||||
|
Icon=/usr/share/icons/hardware_configuration_section.png
|
||||||
|
MimeType=
|
||||||
|
Name[fr_FR]=LALIS
|
||||||
|
Name=LALIS
|
||||||
|
Path=
|
||||||
|
StartupNotify=true
|
||||||
|
Terminal=true
|
||||||
|
TerminalOptions=\s--noclose
|
||||||
|
Type=Application
|
||||||
|
X-DBUS-ServiceName=
|
||||||
|
X-DBUS-StartupType=none
|
||||||
|
X-KDE-RunOnDiscreteGpu=false
|
||||||
|
X-KDE-SubstituteUID=false
|
||||||
|
X-KDE-Username=
|
52
SOURCES/RPM-GPG-KEY-Lalis
Normal file
52
SOURCES/RPM-GPG-KEY-Lalis
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
|
mQINBF0Y59oBEACllwrS1MBN/OcU0XiSEcvK/HgvMw8vB01J/OoaFgr4joQM5ktI
|
||||||
|
5EFRpcxDHc3c+9pArMjLDEHmLu0gaF+fX6+wXOiH8wdJMHeqC1kAh6Q4xSxYa8cr
|
||||||
|
AGuBUSR8lXk+eUDw3pBA+wgFQUnV0UcK/YTdF2GxQyv7SAVCEVyk+VwauIKnz4DI
|
||||||
|
H9tPpNp9Wwrc5Jy0YcuKOYn61KMAy/WARyUWEBJ1VP7tZUrt+4chc8YcryzwX+SU
|
||||||
|
FQZrqN8/y1q2etV2cGXb2DR6nxCHpJNgQXXjcaIWQZKtoYJ2gAnNQl1Vtel8WuZ2
|
||||||
|
fs3T0jflCldc+AuMgMl2+hzXrZXFmDBZxeMs1VuZ72M36p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lQeRai/qh6WpT+
|
||||||
|
5Dsto33F22O9pahrT7Uu7fINek4hQrCaEPii1IneWYlwFbBqjKG/ewARAQABiQI2
|
||||||
|
BBgBCAAgFiEE/L2WMDcsd7DVauTgpbnyPYUl3qEFAl0Y59oCGwwACgkQpbnyPYUl
|
||||||
|
3qGnrQ/8C2Vnj0H522YuUF9eJaqejUCD/6a53RJPxH/dIQPGZK7KtaIxvQ53jqeU
|
||||||
|
j/2bncnwX2fpW/KP5chPzSJg7v1Q/sER54er3Tp0VBZhP6ABKX2/H0+rG/Kl3Nre
|
||||||
|
JfhErJJcHwHceXploe9Mcbb9UTYtaoJ5aZIFZPS6Pnr5gc9Rbr9PKFe2ZJvo6WmM
|
||||||
|
75bhmW/Zgxcih1isJJ9MuomIm7mcJ6GJBpo/HSlGk143TmugvhaZyFdv/l6h/Csh
|
||||||
|
YopA4mU4yLkMmYjHeJH0jRazBlUfEPpwoCmV5US/NHILlIbwvY0aWWDbODcjlbra
|
||||||
|
gxqh7uMGqeIzKzq7Nku1LuS7wcZyN0HciWXLPOWMw4y6Q/0EgsHipi0OsUiipNLG
|
||||||
|
OPgfvyvtJQvt62RBa7l21Y2En9WK2YqdUOlGDhHFjGN9O1jU9h9keCuDLUNtwaOA
|
||||||
|
ksGDfJP7GhkNIcQPgt/GLN2eoDbV1+jWoc3GUk1E6jvVZZmXGr89/J7lIBQr7RMp
|
||||||
|
yQTxbtOCSJDRvnFLtSCNUH1cpCDDPSsP7m3KYdD4XNuZsb4a4SoedkEyzZeRW3wM
|
||||||
|
30gDKG/Buhm5VdhlboH4S0a1INDmTda3imV6Crjr3IVtAc9CjBtDYeqKDzVGcdQe
|
||||||
|
ge6xz7CfV8B4QWQ1lLyDylpp9bGZItcxPBd8B2OmhiRqJ2SmWC0=
|
||||||
|
=nRMk
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
34
SOURCES/checklist.txt
Normal file
34
SOURCES/checklist.txt
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
Les différentes options sont OK, HS (non fonctionnel), NT (présent mais non testé), vide (non disponible)
|
||||||
|
Ajouter à la main les composants non listés ici.
|
||||||
|
|
||||||
|
touchpad :
|
||||||
|
trackpad :
|
||||||
|
bouton gauche haut :
|
||||||
|
bouton droit haut :
|
||||||
|
bouton gauche bas :
|
||||||
|
bouton droit bas :
|
||||||
|
|
||||||
|
Prises USB 2 :
|
||||||
|
Prises USB 3 :
|
||||||
|
e-sata :
|
||||||
|
|
||||||
|
|
||||||
|
audio intégré
|
||||||
|
jack audio out :
|
||||||
|
jack audio in :
|
||||||
|
Jack micro :
|
||||||
|
|
||||||
|
VGA :
|
||||||
|
HDMI :
|
||||||
|
mini-HDMI :
|
||||||
|
display port :
|
||||||
|
|
||||||
|
bluetooth :
|
||||||
|
Wifi :
|
||||||
|
|
||||||
|
lecteur DVD :
|
||||||
|
lecteur d'empreinte digitale :
|
||||||
|
|
||||||
|
port firewire :
|
||||||
|
port série :
|
||||||
|
SD_card :
|
474
SOURCES/identMM.pl
Executable file
474
SOURCES/identMM.pl
Executable file
@ -0,0 +1,474 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Tk;
|
||||||
|
|
||||||
|
#********** INITIALISATION DE LA GENERATION FICHIER CHECKLIST *********
|
||||||
|
#my $CheckFile="/home/lalis/Documents/checklist.txt";
|
||||||
|
my $CheckFile="/usr/share/lalis/checklist.txt";
|
||||||
|
my $PathFicout="/usr/share/lalis/";
|
||||||
|
|
||||||
|
#************* INITIALISATION DES INFORMATIONS GENERALES (LSHW) ****************
|
||||||
|
# copie de la commande dans un tableau pour lshw
|
||||||
|
my @LshwTab=`lshw`;
|
||||||
|
# Extraction des champs relatifs aux item
|
||||||
|
my @ChampsLshw=("description|produit|fabriquant|numéro", # champs Identification ORDINATEUR
|
||||||
|
"description|produit|fabriquant|version",# champs Identification CARTE MERE
|
||||||
|
"description|fabriquant|version",# champs Identification BIOS
|
||||||
|
"description|produit|bits|configuration",# champs Identification CPU
|
||||||
|
"description|produit|fabriquant", # champs Identification CARTE GRAPHIQUE
|
||||||
|
"description|produit|fabriquant|capacité",# champs Identification RESEAU
|
||||||
|
"description|produit|fabriquant",# champs Identification RESEAU
|
||||||
|
"produit|fabriquant|capacité|configuration"# champs Identification BATTERIE
|
||||||
|
);
|
||||||
|
my @LshwTitres=("\n########## Identification ORDINATEUR ##########\n",
|
||||||
|
"\n########## Identification CARTE MERE ##########\n",
|
||||||
|
"\n########## Identification BIOS #########\n",
|
||||||
|
"\n########## Identification CPU ##########\n",
|
||||||
|
"\n########## Identification CARTE GRAPHIQUE ##########\n",
|
||||||
|
"\n########## Identification RESEAU ##########\n",
|
||||||
|
"\n########## Identification BATTERIE ##########\n");
|
||||||
|
# Descripteur de l'item ordinateur
|
||||||
|
my @DescOrdi=("0", # titre du chapitre general (@LshwTitres)
|
||||||
|
"0", # champs (@ChampsLshw) de donnees à extraire
|
||||||
|
"localhost", # debut du bloc a extraire
|
||||||
|
"\\*\\-" # fin du bloc a extraire
|
||||||
|
);
|
||||||
|
# Descripteur de l'item carte mère
|
||||||
|
my @DescCM=("1", # titre du chapitre general (@LshwTitres)
|
||||||
|
"1", # champs (@ChampsLshw) de donnees à extraire
|
||||||
|
"\\*\\-core", # debut du bloc a extraire
|
||||||
|
"\\*\\-" # fin du bloc a extraire
|
||||||
|
);
|
||||||
|
# Descripteur de l'item BIOS
|
||||||
|
my @DescBios=("2", # titre du chapitre general (@LshwTitres)
|
||||||
|
"2", # champs (@ChampsLshw) de donnees à extraire
|
||||||
|
"\\*\\-firmware", # debut du bloc a extraire
|
||||||
|
"\\*\\-" # fin du bloc a extraire
|
||||||
|
);
|
||||||
|
# Descripteur de l'item CPU
|
||||||
|
my @DescCPU=("3", # titre du chapitre general (@LshwTitres)
|
||||||
|
"3", # champs (@ChampsLshw) de donnees à extraire
|
||||||
|
"\\*\\-cpu", # debut du bloc a extraire
|
||||||
|
"\\*\\-" # fin du bloc a extraire
|
||||||
|
);
|
||||||
|
# Descripteur de l'item Affichage
|
||||||
|
my @DescDisp=("4", # titre du chapitre general (@LshwTitres)
|
||||||
|
"4", # champs (@ChampsLshw) de donnees à extraire
|
||||||
|
"\\*\\-display", # debut du bloc a extraire
|
||||||
|
"\\*\\-" # fin du bloc a extraire
|
||||||
|
);
|
||||||
|
# Descripteur de l'item reseau
|
||||||
|
my @DescNet=("5", # titre du chapitre general (@LshwTitres)
|
||||||
|
"5", # champs (@ChampsLshw) de donnees à extraire
|
||||||
|
"\\*\\-network", # debut du bloc a extraire
|
||||||
|
"\\*\\-" # fin du b loc a extraire
|
||||||
|
);
|
||||||
|
# Descripteur de l'item battery
|
||||||
|
my @DescBat=("6", # titre du chapitre general (@LshwTitres)
|
||||||
|
"7", # champs (@ChampsLshw) de donnees à extraire
|
||||||
|
"\\*\\-battery", # debut du bloc a extraire
|
||||||
|
"\\*\\-" # fin du bloc a extraire
|
||||||
|
);
|
||||||
|
|
||||||
|
my @RefItems=("PC","CM","BIOS","CPU","DISP","NET","BAT");
|
||||||
|
#my @RefItems=("PC","CM","BIOS");
|
||||||
|
|
||||||
|
my @temp;
|
||||||
|
my @ident;
|
||||||
|
my $flag=0;
|
||||||
|
|
||||||
|
my $titre;
|
||||||
|
my $start;
|
||||||
|
my $end;
|
||||||
|
my $data;
|
||||||
|
|
||||||
|
#********** INITIALISATION DES INFORMATIONS USB (lsusb) *********
|
||||||
|
|
||||||
|
|
||||||
|
#********** INITIALISATION DES INFORMATIONS MEMOIRES (DMIDECODE) *********
|
||||||
|
# copie de la commande dans un tableau pour dmidecode
|
||||||
|
my @tabdmidecode=`dmidecode -t memory`;
|
||||||
|
my @ChampsMem=("Data|Size|Bank Locator:|Type:|Speed:|Manufacturer");
|
||||||
|
my @MemTitres=("\n########## Identification MEMOIRE ##########\n");
|
||||||
|
my @DescMem=("0", # titre du chapitre general (@SmartTitres)
|
||||||
|
"0", # champs (@ChampsMem) de donnees à extraire
|
||||||
|
"Memory Device", # debut du bloc a extraire
|
||||||
|
"Part" # fin du bloc a extraire
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
#*********** INITIALISATION DES INFORMATIONS DISK (SMARTCTL) **************
|
||||||
|
my @champsdisk=("Family|Model:|Serial|Capacity|Form|SATA");
|
||||||
|
my @ListDisk=`ls /dev/sd?`;
|
||||||
|
my @DescDisk=("0", # titre du chapitre general (@SmartTitres)
|
||||||
|
"0" # champs (@champsdisk) de donnees à extraire
|
||||||
|
);
|
||||||
|
my @DiskTitres=("\n########## Identification DISK ##########\n");
|
||||||
|
|
||||||
|
my $D;
|
||||||
|
my @tabsmart;
|
||||||
|
my @temp2;
|
||||||
|
my $PathD;
|
||||||
|
my $nb=0;
|
||||||
|
|
||||||
|
#********** INITIALISATION DE LA GENERATION FICHIER RESULTAT *********
|
||||||
|
my @RefMachine=("PC", "CM");
|
||||||
|
my @ChampsRef=("numéro", # champs Identification ORDINATEUR
|
||||||
|
"numéro" # champs Identification CARTE MERE
|
||||||
|
);
|
||||||
|
|
||||||
|
# Descripteur de l'item ordinateur
|
||||||
|
my @DescOrdi2=("0", # titre du chapitre general (@LshwTitres)
|
||||||
|
"0", # chamextraireps (@ChampsLshw) de donnees à extraire
|
||||||
|
"localhost", # debut du bloc a extraire
|
||||||
|
"\\*\\-" # fin du bloc a extraire
|
||||||
|
);
|
||||||
|
# Descripteur de l'item carte mère
|
||||||
|
my @DescCM2=("1", # titre du chapitre general (@LshwTitres)
|
||||||
|
"1", # champs (@ChampsLshw) de donnees à extraire
|
||||||
|
"\\*\\-core", # debut du bloc a extraire
|
||||||
|
"\\*\\-" # fin du bloc a extraire
|
||||||
|
);
|
||||||
|
my @FicTab=@LshwTab;
|
||||||
|
my $RefPC=undef;
|
||||||
|
my $RefCM=undef;
|
||||||
|
my $NomFic=undef;
|
||||||
|
my $A;
|
||||||
|
my $item;
|
||||||
|
|
||||||
|
#********** INITIALISATION TRAITEMENT CODE REOUR RSYNC *********
|
||||||
|
my %CodeRetourRsync = (0 => "Succes",
|
||||||
|
1 => "Erreur de syntaxe ou d'utilisation",
|
||||||
|
2 => "Incompatibilite de protocole",
|
||||||
|
3 => "Erreurs lors de la selection des fichiers et des repertoires d'entree/sortie",
|
||||||
|
4 => "Action non supportee",
|
||||||
|
5 => "Erreur lors du démarrage du protocole client-serveur",
|
||||||
|
6 => "Demon incapable d'ecrire dans le fichier de log",
|
||||||
|
10 => "Erreur dans la socket E/S",
|
||||||
|
11 => "Erreur d'E/S fichier",
|
||||||
|
12 => "Erreur dans le flux de donnée du protocole rsync",
|
||||||
|
13 => "Erreur avec les diagnostics du programme",
|
||||||
|
14 => "Erreur dans le code IPC",
|
||||||
|
20 => "SIGUSR1 ou SIGINT reçu ",
|
||||||
|
21 => "Une erreur retournee par waitpid() ",
|
||||||
|
22 => "Erreur lors de l'allocation des tampons de mémoire principaux",
|
||||||
|
23 => "Transfert partiel dut à une erreur",
|
||||||
|
24 => "Transfert partiel dut à la disparition d'un fichier source",
|
||||||
|
25 => "La limite --max-delete a été atteinte",
|
||||||
|
30 => "Dépassement du temps d'attente maximal lors d'envoi/reception de donnees");
|
||||||
|
|
||||||
|
#********** INITIALISATION DE L'AFFICHAGE POPUP DE FIN DE TRAITEMENT *********
|
||||||
|
my @affich;
|
||||||
|
|
||||||
|
#########################################################################
|
||||||
|
# PROGRAMME RENSEIGNEMENT DU FICHIER CHECKLIST
|
||||||
|
#########################################################################
|
||||||
|
# Renseignement du fichier checklist.txt de l'ordinateur par l'opérateur
|
||||||
|
system("su -c 'kwrite $CheckFile' lalis");
|
||||||
|
|
||||||
|
#########################################################################
|
||||||
|
# PROGRAMME DES INFORMATIONS GENERALES (LSHW)
|
||||||
|
#########################################################################
|
||||||
|
foreach (@RefItems) { # foreach @RefItems
|
||||||
|
# Pour chaque item a afficher
|
||||||
|
if ($_ eq "PC"){($titre, $data, $start, $end)=@DescOrdi;}
|
||||||
|
if ($_ eq "CM"){($titre, $data, $start, $end)=@DescCM;}
|
||||||
|
if ($_ eq "BIOS"){($titre, $data, $start, $end)=@DescBios;}
|
||||||
|
if ($_ eq "CPU"){($titre, $data, $start, $end)=@DescCPU;}
|
||||||
|
if ($_ eq "DISP"){($titre, $data, $start, $end)=@DescDisp;}
|
||||||
|
if ($_ eq "NET"){($titre, $data, $start, $end)=@DescNet;}
|
||||||
|
if ($_ eq "BAT"){($titre, $data, $start, $end)=@DescBat;}
|
||||||
|
#print("$end\n");
|
||||||
|
|
||||||
|
$flag=0;
|
||||||
|
foreach (@LshwTab) { # foreach @LshwTab
|
||||||
|
# vidage buffer temporaire
|
||||||
|
@temp=();
|
||||||
|
# extraction d'un bloc memoire dans @temp
|
||||||
|
if ( $flag==0 ){ # attente debut du bloc vu
|
||||||
|
if ( m/$start/ ){ # debut du bloc vu
|
||||||
|
s/$_//;
|
||||||
|
$flag=1;
|
||||||
|
push(@ident,$LshwTitres[$titre]);
|
||||||
|
}
|
||||||
|
}else{ # attente fin du bloc vu
|
||||||
|
push(@temp,$_);
|
||||||
|
if ( m/$end/ ){ # fin du bloc vu
|
||||||
|
$flag=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# Extraction des champs d'un bloc memoire contenu dans @temp
|
||||||
|
foreach (@temp) { # foreach temp
|
||||||
|
if ( m/$ChampsLshw[$data]/ ){
|
||||||
|
s/\s+/ /;
|
||||||
|
push(@ident,$_);
|
||||||
|
}
|
||||||
|
} # fin boucle foreach temp
|
||||||
|
} # fin boucle foreach @LshwTab
|
||||||
|
} # fin boucle foreach @LshwTitres
|
||||||
|
|
||||||
|
|
||||||
|
#########################################################################
|
||||||
|
# PROGRAMME DES INFORMATIONS GENERALES (LSUSB)
|
||||||
|
#########################################################################
|
||||||
|
# vidage buffer temporaire
|
||||||
|
@temp=();
|
||||||
|
@temp=`lsusb`;
|
||||||
|
push(@ident,"\n########## Identification USB ##########\n");
|
||||||
|
# Extraction des champs d'un bloc memoire contenu dans @temp
|
||||||
|
foreach (@temp) { # foreach temp
|
||||||
|
$_=" ".$_;
|
||||||
|
push(@ident,$_);
|
||||||
|
}
|
||||||
|
#########################################################################
|
||||||
|
# PROGRAMME DES INFORMATIONS DES MEMOIRES (DMIDECODE)
|
||||||
|
#########################################################################
|
||||||
|
# titre Identification MEMOIRE
|
||||||
|
push(@ident,$MemTitres[$DescMem[0]]);
|
||||||
|
# initialisation des variables
|
||||||
|
$flag=0;
|
||||||
|
# vidage des tableaux temporaires
|
||||||
|
@temp=();
|
||||||
|
# Pour chaque item a afficher
|
||||||
|
foreach (@tabdmidecode) { # foreach @tabdmidecode
|
||||||
|
#print"@tabdmidecode \n";
|
||||||
|
# vidage des tableaux temporaires
|
||||||
|
@temp=();
|
||||||
|
# extraction de la capacite maxi
|
||||||
|
if ( m/Capacity/ ){
|
||||||
|
s/\s+/ /;
|
||||||
|
push(@ident,$_);
|
||||||
|
#s/Capacity//;
|
||||||
|
}
|
||||||
|
# extraction d'un bloc memoire dans @temp
|
||||||
|
if ( $flag==0 ){ # attente debut du bloc vu
|
||||||
|
if ( m/$DescMem[2]/ ){ # debut du bloc vu
|
||||||
|
$flag=1;
|
||||||
|
push(@ident,"\n************* BANK ***************\n");
|
||||||
|
}
|
||||||
|
}else{ # attente fin du bloc vu
|
||||||
|
push(@temp,$_);
|
||||||
|
if ( m/$DescMem[3]/ ){ # fin du bloc vu
|
||||||
|
$flag=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Extraction des champs d'un bloc memoire contenu dans @temp
|
||||||
|
foreach (@temp) { # foreach temp
|
||||||
|
if ( m/$ChampsMem[$DescMem[1]]/ ){
|
||||||
|
s/\s+/ /;
|
||||||
|
#print;
|
||||||
|
|
||||||
|
push(@ident,$_);
|
||||||
|
}
|
||||||
|
} # fin boucle foreach temp
|
||||||
|
} # fin boucle foreach @tabdmidecode
|
||||||
|
|
||||||
|
|
||||||
|
#########################################################################
|
||||||
|
# PROGRAMME DES INFORMATIONS DISK (SMARTCTL)
|
||||||
|
#########################################################################
|
||||||
|
# titre Identification DISK
|
||||||
|
push(@ident,$DiskTitres[$DescDisk[0]]);
|
||||||
|
# pour chaque disque
|
||||||
|
foreach (@ListDisk) { # foreach disk
|
||||||
|
# commande infos des disques
|
||||||
|
@tabsmart=`smartctl -i $_`;
|
||||||
|
# separation du chemin et nom du disque
|
||||||
|
(my $A, my $B, $D)=split /\//;
|
||||||
|
chop($D);
|
||||||
|
# memorisation chemin + nom du disque
|
||||||
|
$PathD =$_;
|
||||||
|
chop($PathD);
|
||||||
|
|
||||||
|
#@tabsmart=`smartctl -i /dev/$D`;
|
||||||
|
push(@ident,"\n*************** disk ".$D." *************\n");
|
||||||
|
|
||||||
|
# pour chaque disque extraction des champs description
|
||||||
|
foreach (@tabsmart) { # foreach tabsmart
|
||||||
|
if ( m/$champsdisk[$DescDisk[1]]/ ){
|
||||||
|
$_=" ".$_;
|
||||||
|
#print;
|
||||||
|
push(@ident,$_);
|
||||||
|
}
|
||||||
|
} # fin boucle foreach tabsmart
|
||||||
|
# Sante du disque
|
||||||
|
push(@ident,"\n--------------- Etat Disk ".$D." --------------\n");
|
||||||
|
@temp=();
|
||||||
|
@temp=`smartctl -H $PathD`;
|
||||||
|
# pour chaque ligne de la commande smartctl
|
||||||
|
foreach (@temp) {
|
||||||
|
# recherche du resultat sante disk
|
||||||
|
#$nb++;
|
||||||
|
if ( m/result:/ ){
|
||||||
|
#$nb++;
|
||||||
|
#print "$nb\n";
|
||||||
|
# Affichage de la ligne pour POPUP
|
||||||
|
#push(@affich,"Partition"."sdisk".":"$_);
|
||||||
|
push(@affich,"Partition ".$D.": ".$_);
|
||||||
|
# si le resultat est OK alors enregistrement
|
||||||
|
if ( m/PASSED/ ){
|
||||||
|
#$nb++;
|
||||||
|
#print "$nb\n";
|
||||||
|
push(@ident,$_);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
# si le resultat est NOK alors enregistrement de la commande
|
||||||
|
@temp2=`smartctl -a $PathD`;
|
||||||
|
foreach (@temp2) {
|
||||||
|
push(@ident,$_);
|
||||||
|
} # fin foreach (@temp2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} # fin foreach (@temp)
|
||||||
|
} # fin foreach disk
|
||||||
|
|
||||||
|
#########################################################################
|
||||||
|
# PROGRAMME DE LA GENERATION FICHIER RESULTAT
|
||||||
|
#########################################################################
|
||||||
|
# initialisation des variables
|
||||||
|
$flag=0;
|
||||||
|
foreach (@RefMachine) { # foreach @RefMachine
|
||||||
|
@temp=();
|
||||||
|
# Pour chaque item a afficher
|
||||||
|
if ($_ eq "PC"){($A, $data, $start, $end)=@DescOrdi2;}
|
||||||
|
if ($_ eq "CM"){($A, $data, $start, $end)=@DescCM2;}
|
||||||
|
$item=$_;
|
||||||
|
#print "$A\n";
|
||||||
|
#print "$data\n";
|
||||||
|
#print "$start\n";
|
||||||
|
#print "$fin\n";
|
||||||
|
foreach (@FicTab) { # foreach @FicTab
|
||||||
|
# extraction d'un bloc memoire dans @temp
|
||||||
|
if ( $flag==0 ){ # attente debut du bloc vu
|
||||||
|
if ( m/$start/ ){ # debut du bloc vu
|
||||||
|
s/$_//;
|
||||||
|
$flag=1;
|
||||||
|
}
|
||||||
|
}else{ # attente fin du bloc vu
|
||||||
|
push(@temp,$_);
|
||||||
|
if ( m/$end/ ){ # fin du bloc vu
|
||||||
|
$flag=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Extraction des champs d'un bloc memoire contenu dans @temp
|
||||||
|
foreach (@temp) { # foreach temp
|
||||||
|
if ( m/$ChampsRef[$data]/ ){
|
||||||
|
#s/\s+//;
|
||||||
|
#print"$_";
|
||||||
|
(my $E, my $Ref)=split(/:/,$_);
|
||||||
|
$_=$Ref;
|
||||||
|
s/\s+//;
|
||||||
|
chop($_);
|
||||||
|
#print"$_";
|
||||||
|
if ($item eq "PC"){$RefPC=$_;}
|
||||||
|
if ($item eq "CM"){$RefCM=$_;}
|
||||||
|
}
|
||||||
|
} # fin boucle foreach temp
|
||||||
|
} # fin boucle foreach @FicTab
|
||||||
|
|
||||||
|
} # fin boucle foreach @RefMachine
|
||||||
|
#print "$RefPC";
|
||||||
|
#print "$RefCM";
|
||||||
|
|
||||||
|
# patern pour test de la validite du test de la reference PC et CM
|
||||||
|
#$RefPC="CZC1194MME";
|
||||||
|
#$RefPC=undef;
|
||||||
|
#$RefPC="";
|
||||||
|
|
||||||
|
#$RefCM="CZC1194MMF";
|
||||||
|
#$RefCM=undef;
|
||||||
|
#$RefCM="";
|
||||||
|
# fin patern pour test de la validite du test de la reference PC et CM
|
||||||
|
|
||||||
|
# Test si $RefPC est: defini ET n'est pas une chaine vide ET ne contient pas d'espace
|
||||||
|
# Test si $RefCM est: defini ET n'est pas une chaine vide ET ne contient pas d'espace
|
||||||
|
if ((defined $RefPC) && ($RefPC ne "") && !($RefPC =~ m/\s+/))
|
||||||
|
{ $NomFic="PC_".$RefPC.".txt";
|
||||||
|
}elsif((defined $RefCM) && ($RefCM ne "") && !($RefCM =~ m/\s+/)){
|
||||||
|
$NomFic="CM_".$RefCM.".txt";
|
||||||
|
}else{
|
||||||
|
$NomFic="ERROR.txt";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#########################################################################
|
||||||
|
# PROGRAMME DE CONCATENATION DES FICHIERS CHECKLIST PLUS CARACTERISTIQUES
|
||||||
|
#########################################################################
|
||||||
|
# La concatenation des fichiers checklist suivi de caractéristiques
|
||||||
|
# se trouve dans un fichier nommé avec la référence du PC ou de la carte
|
||||||
|
# Enregistrement du tableau @ident dans le fichier de nom $NomFic
|
||||||
|
|
||||||
|
open(my $FIN, "<",$CheckFile) or die "Ouverture du fichier $CheckFile impossible\n";
|
||||||
|
open(my $FOUT, ">",$PathFicout.$NomFic) or die "Ouverture du fichier $NomFic impossible\n";
|
||||||
|
# Recopie du fichier checklist dans le fichier ref PC ou carte $NomFic
|
||||||
|
while(<$FIN>){
|
||||||
|
print ($FOUT $_); # ecrit la ligne dans le fichier $NomFic
|
||||||
|
#print("$_");
|
||||||
|
}
|
||||||
|
#print ($Fout "TOTO\n");
|
||||||
|
#print "\n";
|
||||||
|
# Recopie du tableau caracteristiques PC dans le fichier ref PC ou carte $NomFic
|
||||||
|
foreach(@ident){
|
||||||
|
print ($FOUT $_);
|
||||||
|
#print("$_");
|
||||||
|
}
|
||||||
|
close ($FIN);
|
||||||
|
close ($FOUT);
|
||||||
|
|
||||||
|
#########################################################################
|
||||||
|
# PROGRAMME D'ENVOI DU FICHIER RESULTAT VERS LE SERVEUR
|
||||||
|
#########################################################################
|
||||||
|
# Envoi du fichier concatené checklist plus caracteristiques PC sur le serveur
|
||||||
|
my $ret=system("rsync --port 10073 -aP " . $PathFicout.$NomFic . " 'lalis69.ddns.net::lalis-ordis/'");
|
||||||
|
#my $ret=system("rsync --port 10073 -aP " . $PathFicout.$NomFic . " 'lalis68.ddns.net::lalis-ordis/'");
|
||||||
|
# sauvegarde du code retour
|
||||||
|
#my $ret=$?;
|
||||||
|
#print "******* $? ******\n";
|
||||||
|
#$ret=10;
|
||||||
|
#print "******* $ret ******\n";
|
||||||
|
|
||||||
|
# Libele et affichage du code retour de rsync
|
||||||
|
if (exists ($CodeRetourRsync{$ret})){
|
||||||
|
$_ = "Code retour rsync: ".$ret;
|
||||||
|
push(@affich,$_);
|
||||||
|
$_ = "Libellé code retour rsync: ".$CodeRetourRsync{$ret};
|
||||||
|
push(@affich,$_);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
push(@affich,"Code retour rsync Inconnu!!! ".$ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
#########################################################################
|
||||||
|
# PROGRAMME DE L'AFFICHAGE POPUP DE FIN DE TRAITEMENT
|
||||||
|
#########################################################################
|
||||||
|
my $mw = MainWindow->new();
|
||||||
|
$mw->title("Resultat test HDD");
|
||||||
|
$mw->geometry("700x100");
|
||||||
|
foreach (@affich) {
|
||||||
|
# affichage dans la fenetre
|
||||||
|
$mw->Label(-text => $_)->pack;
|
||||||
|
}
|
||||||
|
MainLoop;
|
||||||
|
|
||||||
|
print "\n########## Nom fichier resultat: $NomFic ##########\n";
|
||||||
|
print "\n################ Traitement terminé ################\n";
|
||||||
|
print "\n";
|
||||||
|
################################ FIN PROGRAMME ################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
33
SOURCES/journald.conf
Normal file
33
SOURCES/journald.conf
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# This file is part of systemd.
|
||||||
|
#
|
||||||
|
# systemd is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU Lesser General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# See journald.conf(5) for details
|
||||||
|
|
||||||
|
[Journal]
|
||||||
|
#Storage=auto
|
||||||
|
Compress=yes
|
||||||
|
#Seal=yes
|
||||||
|
#SplitMode=login
|
||||||
|
#SyncIntervalSec=5m
|
||||||
|
#RateLimitInterval=30s
|
||||||
|
#RateLimitBurst=1000
|
||||||
|
SystemMaxUse=200M
|
||||||
|
SystemKeepFree=1G
|
||||||
|
SystemMaxFileSize=200M
|
||||||
|
RuntimeMaxUse=200M
|
||||||
|
RuntimeKeepFree=300M
|
||||||
|
RuntimeMaxFileSize=200M
|
||||||
|
#MaxRetentionSec=
|
||||||
|
MaxFileSec=15days
|
||||||
|
ForwardToSyslog=yes
|
||||||
|
#ForwardToKMsg=no
|
||||||
|
ForwardToConsole=yes
|
||||||
|
TTYPath=/dev/tty12
|
||||||
|
#MaxLevelStore=debug
|
||||||
|
#MaxLevelSyslog=debug
|
||||||
|
#MaxLevelKMsg=notice
|
||||||
|
#MaxLevelConsole=info
|
9
SOURCES/lalis-i586-source.repo
Normal file
9
SOURCES/lalis-i586-source.repo
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[lalis-i586-source]
|
||||||
|
name=Lalis $releasever - i586 -source
|
||||||
|
baseurl=https://lalis69.ddns.net:10443/mageia/lalis/$releasever/
|
||||||
|
#metalink=https://mirrors.mageia.org/metalink?distrib=mageia-$releasever&arch=i586§ion=core&repo=release
|
||||||
|
#mirrorlist=https://lalis69.ddns.net:10443/mageia/lalis/$releasever/i586/media/core
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Lalis
|
||||||
|
fastestmirror=1
|
||||||
|
enabled=0
|
9
SOURCES/lalis-i586.repo
Normal file
9
SOURCES/lalis-i586.repo
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[lalis-i586]
|
||||||
|
name=Lalis $releasever - i586
|
||||||
|
baseurl=https://lalis69.ddns.net:10443/mageia/lalis/$releasever/
|
||||||
|
#metalink=https://mirrors.mageia.org/metalink?distrib=mageia-$releasever&arch=i586§ion=core&repo=release
|
||||||
|
#mirrorlist=https://lalis69.ddns.net:10443/mageia/lalis/$releasever/i586/media/core
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Lalis
|
||||||
|
fastestmirror=1
|
||||||
|
enabled=0
|
9
SOURCES/lalis-x86_64-source.repo
Normal file
9
SOURCES/lalis-x86_64-source.repo
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[lalis-x86_64-source]
|
||||||
|
name=Lalis $releasever - x86_64 - source
|
||||||
|
baseurl=https://lalis69.ddns.net:10443/mageia/lalis/$releasever/
|
||||||
|
#metalink=https://mirrors.mageia.org/metalink?distrib=mageia-$releasever&arch=x86_64§ion=core&repo=release
|
||||||
|
#mirrorlist=https://lalis69.ddns.net:10443/mageia/lalis/$releasever/x86_64/media/core
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Lalis
|
||||||
|
fastestmirror=1
|
||||||
|
enabled=1
|
9
SOURCES/lalis-x86_64.repo
Normal file
9
SOURCES/lalis-x86_64.repo
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[lalis-x86_64]
|
||||||
|
name=Lalis $releasever - x86_64
|
||||||
|
baseurl=https://lalis69.ddns.net:10443/mageia/lalis/$releasever/
|
||||||
|
#metalink=https://mirrors.mageia.org/metalink?distrib=mageia-$releasever&arch=x86_64§ion=core&repo=release
|
||||||
|
#mirrorlist=https://lalis69.ddns.net:10073/mageia/lalis/$releasever/x86_64/media/core
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Lalis
|
||||||
|
fastestmirror=1
|
||||||
|
enabled=1
|
BIN
SOURCES/lalis.png
Normal file
BIN
SOURCES/lalis.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
5
SOURCES/lalistunnel
Executable file
5
SOURCES/lalistunnel
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/sh
|
||||||
|
|
||||||
|
ssh -i /usr/share/lalis/ssh_id_rsa -p 10022 -N -f -R 6000:localhost:22 ssh@lalis69.ddns.net
|
||||||
|
ssh -i /usr/share/lalis/ssh_id_rsa -p 10022 -N -f -R 5900:localhost:5900 ssh@lalis69.ddns.net
|
||||||
|
x0vncserver -display :0 -SecurityTypes None -rfbport 5900
|
BIN
SOURCES/simple-scan.mo.patch
Normal file
BIN
SOURCES/simple-scan.mo.patch
Normal file
Binary file not shown.
38
SOURCES/ssh_id_rsa
Normal file
38
SOURCES/ssh_id_rsa
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||||
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
|
||||||
|
NhAAAAAwEAAQAAAYEA0DXdvfzLqH/UXBqY6fcY81CJpCRdqfBGNgPWHW7/kWJSEfx5Clfc
|
||||||
|
pwEGReahHN2ttB+Xcb/EimiL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NPeSIHleg66KmDNuVcTkBld8h4/pb5lVbI9/HnO0mRsG3Gn3
|
||||||
|
lvvyguEVA3CEtNtMZy/+RyoeoXgkv3byN/RgDhOM7UkzZbparDWP8VlrA3hou3qKQEQCnQ
|
||||||
|
KIqd+hhJYXVRvnaySYe7Muvd1y7ewPAAAAwQDepEh0l8ztwNfuDLu4wRqsnDEl8+gWAA8e
|
||||||
|
ymzJgrl1rrJkYv9eLSL7db3KQFobIgUsLrs8vpMJlZB4hie5MZTIWLpSTHS+mppSQwI/C4
|
||||||
|
IhWpvDAq3ErRYxs1I7NR5ZgJQwehrdXBMS5HrV4sWYly3LAWCpoi83gtWTAzVCnDgdQEOE
|
||||||
|
cLCQcEuDGS0hKKz4svVdvoGE5PhN4+ft/VExKNnG7oxAR0CftYhxGGru9EHCeBYrQaCQn5
|
||||||
|
lsxwi54nQvqm0AAAAUc3NoQHNlcnZldXIubGFsaXMuZnIBAgMEBQYH
|
||||||
|
-----END OPENSSH PRIVATE KEY-----
|
19
SOURCES/test.desktop
Normal file
19
SOURCES/test.desktop
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Comment[fr_FR]=Outils de test et d'inventaire matériel de LALIS
|
||||||
|
Comment=Outils de test et d'inventaire matériel de LALIS
|
||||||
|
Exec=kdesu -u root /usr/bin/identMM.pl
|
||||||
|
GenericName[fr_FR]=Test
|
||||||
|
GenericName=Test
|
||||||
|
Icon=bleachbit
|
||||||
|
MimeType=
|
||||||
|
Name[fr_FR]=Test
|
||||||
|
Name=Test
|
||||||
|
Path=
|
||||||
|
StartupNotify=true
|
||||||
|
Terminal=true
|
||||||
|
TerminalOptions=\s--noclose
|
||||||
|
Type=Application
|
||||||
|
X-DBUS-ServiceName=
|
||||||
|
X-DBUS-StartupType=
|
||||||
|
X-KDE-SubstituteUID=false
|
||||||
|
X-KDE-Username=
|
198
SPECS/lalis-config.spec
Normal file
198
SPECS/lalis-config.spec
Normal file
@ -0,0 +1,198 @@
|
|||||||
|
Summary: Install LALIS configuration
|
||||||
|
Name: lalis-config
|
||||||
|
Version: 1
|
||||||
|
Release: %mkrel 1
|
||||||
|
License: GPLv3
|
||||||
|
Group: Tools
|
||||||
|
Url: http://lalis.fr
|
||||||
|
BuildArch: noarch
|
||||||
|
Source1: journald.conf
|
||||||
|
Source2: lalistunnel
|
||||||
|
Source3: Lalis.desktop
|
||||||
|
Source4: identMM.pl
|
||||||
|
Source5: test.desktop
|
||||||
|
Source6: checklist.txt
|
||||||
|
Source8: ssh_id_rsa
|
||||||
|
Source9: RPM-GPG-KEY-Lalis
|
||||||
|
Source10: lalis-i586.repo
|
||||||
|
Source11: lalis-i586-source.repo
|
||||||
|
Source12: lalis-x86_64.repo
|
||||||
|
Source13: lalis-x86_64-source.repo
|
||||||
|
Obsoletes: task-lalis-minimal < 5.6
|
||||||
|
|
||||||
|
%description
|
||||||
|
Configure for lalis tools
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/lalis
|
||||||
|
mkdir %{buildroot}%{_datadir}/kio_desktop
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/dist/desktop-files/default
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/pki/rpm-gpg
|
||||||
|
mkdir %{buildroot}%{_sysconfdir}/yum.repos.d
|
||||||
|
cp %{SOURCE2} %{buildroot}%{_bindir}
|
||||||
|
cp %{SOURCE4} %{buildroot}%{_bindir}
|
||||||
|
cp %{SOURCE3} %{buildroot}%{_datadir}/kio_desktop/
|
||||||
|
cp %{SOURCE3} %{buildroot}%{_datadir}/dist/desktop-files/default/
|
||||||
|
cp %{SOURCE5} %{buildroot}%{_datadir}/dist/desktop-files/default/
|
||||||
|
cp %{SOURCE1} %{buildroot}%{_datadir}/lalis/
|
||||||
|
cp %{SOURCE6} %{buildroot}%{_datadir}/lalis/
|
||||||
|
cp %{SOURCE8} %{buildroot}%{_datadir}/lalis/
|
||||||
|
cp %{SOURCE9} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
|
||||||
|
cp %{SOURCE10} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
||||||
|
cp %{SOURCE11} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
||||||
|
cp %{SOURCE12} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
||||||
|
cp %{SOURCE13} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
||||||
|
|
||||||
|
%files
|
||||||
|
|
||||||
|
%{_bindir}/lalistunnel
|
||||||
|
%{_bindir}/identMM.pl
|
||||||
|
%{_datadir}/kio_desktop/Lalis.desktop
|
||||||
|
%{_datadir}/lalis/*
|
||||||
|
%{_datadir}/dist/desktop-files/default/*
|
||||||
|
%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-Lalis
|
||||||
|
%{_sysconfdir}/yum.repos.d/*
|
||||||
|
|
||||||
|
%post
|
||||||
|
# configuration de l'assistance à distance
|
||||||
|
# trouve le nom du dossier de bureau
|
||||||
|
desktop()
|
||||||
|
{
|
||||||
|
if [ -f "$1/.config/user-dirs.dirs" ]; then
|
||||||
|
DESKTOP=`grep XDG_DESKTOP_DIR $1/.config/user-dirs.dirs`
|
||||||
|
DESKTOP=`echo ${DESKTOP##*/} | sed -e s/\"//g`
|
||||||
|
else
|
||||||
|
DESKTOP=""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# crée un utilisateur Lalis et enlève les droits de lecture/écriture/visibilité/exécution à others
|
||||||
|
cp -f /usr/share/lalis/journald.conf /etc/systemd/
|
||||||
|
getent passwd lalis
|
||||||
|
if [ ${?} -ne 0 ]; then
|
||||||
|
adduser lalis
|
||||||
|
chmod -R o-rwX /home/lalis
|
||||||
|
passwd lalis << EOF
|
||||||
|
Lalis
|
||||||
|
Lalis
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ajoute l'utilisateur lalis à la liste des utilisateurs autorisés à se connecter en ssh
|
||||||
|
echo "Ajout de l'utilisateur Lalis dans sshd_config"
|
||||||
|
if [ -z "`grep lalis /etc/ssh/sshd_config`" ]; then
|
||||||
|
if [ -z "`grep -i allowusers /etc/ssh/sshd_config`" ]; then
|
||||||
|
echo "Allowusers lalis" >>/etc/ssh/sshd_config
|
||||||
|
else
|
||||||
|
sed -i -e 's/^Allowusers.*$/& lalis/g' /etc/ssh/sshd_config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "relance sshd"
|
||||||
|
/usr/bin/systemctl restart sshd
|
||||||
|
|
||||||
|
# Ajoute le fichier test.desktop sur le bureau de l'utilisateur lalis
|
||||||
|
echo "Ajout du script de test sur le bureau de lalis"
|
||||||
|
desktop /home/lalis
|
||||||
|
echo $DESKTOP
|
||||||
|
if [ "$DESKTOP" = "" ]; then
|
||||||
|
/usr/bin/mkdir "/home/lalis/Desktop"
|
||||||
|
fi
|
||||||
|
chmod a+rw /usr/share/lalis/checklist.txt
|
||||||
|
cp /usr/share/dist/desktop-files/default/test.desktop /home/lalis/$DESKTOP/
|
||||||
|
chown lalis:lalis -R /home/lalis/$DESKTOP/test.desktop
|
||||||
|
# Copie le fichier Lalis.desktop dans le dossier /etc/skel
|
||||||
|
cp -f /usr/share/kio_desktop/Lalis.desktop /etc/skel/$DESKTOP
|
||||||
|
|
||||||
|
# Copie le fichier Lalis.desktop sur le bureau des utilisateurs existant
|
||||||
|
echo "copie de lalis.desktop dans le bureau des utilisateurs"
|
||||||
|
cp -f /usr/share/kio_desktop/Lalis.desktop /usr/share/dist/desktop-files/default/
|
||||||
|
for i in /home/*
|
||||||
|
do
|
||||||
|
USER=`basename "$i"`
|
||||||
|
getent passwd "$USER"
|
||||||
|
if [ ${?} -eq 0 ]; then
|
||||||
|
if [ -d $i ]; then
|
||||||
|
desktop "/$i"
|
||||||
|
echo $DESKTOP
|
||||||
|
if ! [ -d "$i/$DESKTOP" ]; then
|
||||||
|
su -c "mkdir $i/$DESKTOP" - "$USER"
|
||||||
|
echo "su -c mkdir $i/$DESKTOP - $USER"
|
||||||
|
fi
|
||||||
|
cp -fa /usr/share/kio_desktop/Lalis.desktop "$i/$DESKTOP/"
|
||||||
|
chown $USER:$USER "$i/$DESKTOP"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
#disabling mdadm when no raid detected
|
||||||
|
|
||||||
|
MD=`grep -c active /proc/mdstat`
|
||||||
|
if [ $MD > 0 ]; then
|
||||||
|
echo "Désactivation de mdadm"
|
||||||
|
systemctl disable mdadm.service
|
||||||
|
fi
|
||||||
|
|
||||||
|
#disabling network-up if nfs not used
|
||||||
|
if [ ! -e /etc/nfs.conf ]; then
|
||||||
|
echo "Désactivation de network-up"
|
||||||
|
systemctl disable network-up
|
||||||
|
fi
|
||||||
|
ARCH=`uname -i`
|
||||||
|
U=`uname -r`
|
||||||
|
MGAVERSION=${U##*.mga}
|
||||||
|
|
||||||
|
#adding lalis mirror
|
||||||
|
echo "ajout du miroir Lalis"
|
||||||
|
grep -q 'lalis rsync://lalis69.ddns.net:10073/mageia/lalis/' /etc/urpmi/urpmi.cfg
|
||||||
|
if [ ${?} -ne 0 ]; then
|
||||||
|
echo -e "\nlalis rsync://lalis69.ddns.net:10073/mageia/lalis/$MGAVERSION/x86_64/media/core {\n}" >>/etc/urpmi/urpmi.cfg
|
||||||
|
echo "urpmi.update lalis" | at now +1 minutes
|
||||||
|
fi
|
||||||
|
|
||||||
|
%postun
|
||||||
|
|
||||||
|
# trouve le nom du dossier de bureau
|
||||||
|
desktop()
|
||||||
|
{
|
||||||
|
if [ -f "$1/.config/user-dirs.dirs" ]; then
|
||||||
|
DESKTOP=`grep XDG_DESKTOP_DIR $1/.config/user-dirs.dirs`
|
||||||
|
DESKTOP=`echo ${DESKTOP##*/} | sed -e s/\"//g`
|
||||||
|
else
|
||||||
|
DESKTOP=""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# supprime l'utilisateur Lalis
|
||||||
|
echo "Suppression de l'utilisateur lalis (dossier personnel compris)"
|
||||||
|
userdel -rf lalis
|
||||||
|
|
||||||
|
# supprime l'utilisateur lalis de la liste des utilisateurs autorisés à se connecter en ssh
|
||||||
|
echo "suppression de l'utilisateur lalis de sshd_config"
|
||||||
|
if [ -n "`grep lalis /etc/ssh/sshd_config`" ]; then
|
||||||
|
sed -i -e 's/ lalis//g' /etc/ssh/sshd_config
|
||||||
|
fi
|
||||||
|
/usr/bin/systemctl restart sshd
|
||||||
|
|
||||||
|
# Supprime le fichier Lalis.desktop dans le dossier /etc/skel
|
||||||
|
echo "suppression de Lalis.desktop du dossier /etc/skel"
|
||||||
|
rm -f /etc/skel/$DESKTOP/Lalis.desktop
|
||||||
|
|
||||||
|
# Supprime le fichier Lalis.desktop de bureau des utilisateurs existant
|
||||||
|
echo "suppression de Lalis.desktop du dossier de bureau des utilisateurs"
|
||||||
|
for i in /home/*
|
||||||
|
do
|
||||||
|
USER=`basename "$i"`
|
||||||
|
getent passwd "$USER"
|
||||||
|
if [ ${?} -eq 0 ]; then
|
||||||
|
if [ -d $i ]; then
|
||||||
|
desktop "/$i"
|
||||||
|
echo $DESKTOP
|
||||||
|
rm -f "$i/$DESKTOP/Lalis.desktop"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# supprime le miroir lalis
|
||||||
|
echo "suppression du dépôt lalis"
|
||||||
|
echo "urpmi.removemedia lalis" | at now +1 minutes
|
Reference in New Issue
Block a user