ajout d'un exemple d'exercice corrigé
This commit is contained in:
parent
7987c5bb21
commit
f149b43557
|
@ -0,0 +1,443 @@
|
|||
\documentclass[a4paper,11pt]{report}
|
||||
\usepackage{ifxetex}
|
||||
\ifxetex
|
||||
%\usepackage{fontspec}
|
||||
%\usepackage{xunicode}
|
||||
\usepackage{xltxtra}
|
||||
\defaultfontfeatures{Mapping=tex-text} % To support LaTeX quoting style
|
||||
\setmainfont{Caviar Dreams}
|
||||
\else
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{amsfonts}
|
||||
\fi
|
||||
\usepackage{pifont}
|
||||
\usepackage{geometry}
|
||||
\usepackage{fancybox}
|
||||
\usepackage{verbatim}
|
||||
\usepackage{eurosym}
|
||||
\usepackage[english, francais]{babel}
|
||||
\usepackage{listings}
|
||||
\usepackage{color}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{titlesec}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{lastpage}
|
||||
|
||||
\setlength{\hoffset}{-18pt}
|
||||
\setlength{\oddsidemargin}{0pt} % Marge gauche sur pages impaires
|
||||
\setlength{\evensidemargin}{9pt} % Marge gauche sur pages paires
|
||||
\setlength{\marginparwidth}{54pt} % Largeur de note dans la marge
|
||||
\setlength{\textwidth}{481pt} % Largeur de la zone de texte (17cm)
|
||||
\setlength{\voffset}{-18pt} % Bon pour DOS
|
||||
\setlength{\marginparsep}{7pt} % Séparation de la marge
|
||||
\setlength{\topmargin}{0pt} % Pas de marge en haut
|
||||
\setlength{\headheight}{13pt} % Haut de page
|
||||
\setlength{\headsep}{10pt} % Entre le haut de page et le texte
|
||||
\setlength{\footskip}{27pt} % Bas de page + séparation
|
||||
\setlength{\textheight}{708pt} % Hauteur de la zone de texte (25cm)
|
||||
|
||||
\definecolor{gray}{rgb}{0.4,0.4,0.4}
|
||||
\definecolor{darkblue}{rgb}{0.0,0.0,0.6}
|
||||
\definecolor{cyan}{rgb}{0.0,0.6,0.6}
|
||||
|
||||
\lstset{
|
||||
basicstyle=\ttfamily,
|
||||
columns=fullflexible,
|
||||
showstringspaces=false,
|
||||
commentstyle=\color{gray}\upshape
|
||||
}
|
||||
|
||||
\lstdefinelanguage{XML}
|
||||
{
|
||||
morestring=[b]",
|
||||
morestring=[s]{>}{<},
|
||||
morecomment=[s]{<?}{?>},
|
||||
stringstyle=\color{black},
|
||||
identifierstyle=\color{darkblue},
|
||||
keywordstyle=\color{cyan},
|
||||
morekeywords={xmlns,version,type}% list your attributes here
|
||||
}
|
||||
|
||||
% TITRE DU DOCUMENT !
|
||||
\title{Corrigé des exercices : création d'un dictionnaire EOLE}
|
||||
|
||||
%\date{}
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
\normalsize
|
||||
\vspace{2cm}
|
||||
\textbf{Rédacteurs :}
|
||||
\begin{itemize}
|
||||
\item Emmanuel Garette (egarette@cadoles.com)
|
||||
\item Vincent Febvre (vfebvre@cadoles.com) \newline
|
||||
\end{itemize}
|
||||
\vspace{2cm}
|
||||
\textbf{Version} : 1.0 \newline
|
||||
|
||||
\chapter{Création d'un dictionnaire vierge}
|
||||
|
||||
Le répertoire des dictionnaires personnalisés local est dans /usr/share/eole/creole/local.
|
||||
|
||||
Créé un fichier en suivant les conventions suivantes :
|
||||
|
||||
\begin{itemize}
|
||||
\item deux chiffres en préfix
|
||||
\item le séparateur \_
|
||||
\item le nom du projet
|
||||
\item l'extention .xml
|
||||
\end{itemize}
|
||||
|
||||
Créer le fichier 00\_ircd.xml avec la structure de base suivante :
|
||||
|
||||
\begin{lstlisting}[language=XML]
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<creole>
|
||||
|
||||
<files>
|
||||
</files>
|
||||
|
||||
<variables>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
</constraints>
|
||||
|
||||
<help>
|
||||
</help>
|
||||
|
||||
</creole>
|
||||
\end{lstlisting}
|
||||
|
||||
\chapter{Installation du paquet et gestion du service}
|
||||
|
||||
Le logiciel doit s'installer à l'instanciation du serveur et le service doit être géré par EOLE :
|
||||
|
||||
\begin{lstlisting}
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<creole>
|
||||
|
||||
<files>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}[language=XML]
|
||||
<package>ircd-irc2</package>
|
||||
<service>ircd-irc2</service>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}
|
||||
</files>
|
||||
|
||||
<variables>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
</constraints>
|
||||
|
||||
<help>
|
||||
</help>
|
||||
|
||||
</creole>
|
||||
\end{lstlisting}
|
||||
|
||||
\chapter{Ouverture du firewall et tcpwrapper}
|
||||
\begin{lstlisting}
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<creole>
|
||||
|
||||
<files>
|
||||
<package>ircd-irc2</package>
|
||||
<service>ircd-irc2</service>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}[language=XML]
|
||||
<service_access service='ircd-irc2'>
|
||||
<port port_type="SymLinkOption">ircd_port</port>
|
||||
</service_access>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}
|
||||
</files>
|
||||
|
||||
<variables>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
</constraints>
|
||||
|
||||
<help>
|
||||
</help>
|
||||
|
||||
</creole>
|
||||
\end{lstlisting}
|
||||
|
||||
\chapter{Activation/désactivation du service}
|
||||
|
||||
Ajouter une variable pour activer/désactiver le service :
|
||||
|
||||
\begin{lstlisting}
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<creole>
|
||||
|
||||
<files>
|
||||
<package>ircd-irc2</package>
|
||||
<service>ircd-irc2</service>
|
||||
<service_access service='ircd-irc2'>
|
||||
<port port_type="SymLinkOption">ircd_port</port>
|
||||
</service_access>
|
||||
</files>
|
||||
|
||||
<variables>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}[language=XML]
|
||||
<family name='services'>
|
||||
<variable name='activer_ircd' type='oui/non' description="Activer le serveur IRC" >
|
||||
<value>oui</value>
|
||||
</variable>
|
||||
</family>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
</constraints>
|
||||
|
||||
<help>
|
||||
</help>
|
||||
|
||||
</creole>
|
||||
\end{lstlisting}
|
||||
|
||||
\chapter{Ajout du template}
|
||||
|
||||
Le fichier de configuration du service doit être "templatiser" par EOLE :
|
||||
|
||||
\begin{lstlisting}
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<creole>
|
||||
|
||||
<files>
|
||||
<package>ircd-irc2</package>
|
||||
<service>ircd-irc2</service>
|
||||
<service_access service='ircd-irc2'>
|
||||
<port port_type="SymLinkOption">ircd_port</port>
|
||||
</service_access>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}[language=XML]
|
||||
<file name='/etc/ircd/ircd.conf'/>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}
|
||||
</files>
|
||||
|
||||
<variables>
|
||||
<family name='services'>
|
||||
<variable name='activer_ircd' type='oui/non' description="Activer le serveur IRC" >
|
||||
<value>oui</value>
|
||||
</variable>
|
||||
</family>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
</constraints>
|
||||
|
||||
<help>
|
||||
</help>
|
||||
|
||||
</creole>
|
||||
\end{lstlisting}
|
||||
|
||||
|
||||
\chapter{Ajout des variables}
|
||||
Dans le template nous allons utiliser des variables définis dans le dictionnaire. Nous allons ajouter les variable pour configurer les M line et les K line :
|
||||
|
||||
\begin{lstlisting}
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<creole>
|
||||
|
||||
<files>
|
||||
<package>ircd-irc2</package>
|
||||
<service>ircd-irc2</service>
|
||||
<service_access service='ircd-irc2'>
|
||||
<port port_type="SymLinkOption">ircd_port</port>
|
||||
</service_access>
|
||||
<file name='/etc/ircd/ircd.conf'/>
|
||||
</files>
|
||||
|
||||
<variables>
|
||||
<family name='services'>
|
||||
<variable name='activer_ircd' type='oui/non' description="Activer le serveur IRC" >
|
||||
<value>oui</value>
|
||||
</variable>
|
||||
</family>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}[language=XML]
|
||||
<family name='services'>
|
||||
<variable name='activer_ircd' type='oui/non' description="Activer le serveur IRC" >
|
||||
<value>oui</value>
|
||||
</variable>
|
||||
</family>
|
||||
<family name='ircd'>
|
||||
<variable name='ircd_domaine' type='domain'
|
||||
description="Nom de domaine utilisé pour accéder au serveur IRC"/>
|
||||
<variable name='ircd_libelle' type='string' description="Libellé du serveur IRC"/>
|
||||
<variable name='ircd_port' type='port' description="Port du serveur IRC"
|
||||
mode='expert'>
|
||||
<value>6667</value>
|
||||
</variable>
|
||||
<variable name='ircd_banned_hostname' type='domain'
|
||||
description="Hote banni sur le serveur IRC" multi="True" mandatory="True"/>
|
||||
<variable name='ircd_banned_comment' type='string'
|
||||
description="Motif du bannissement du serveur IRC">
|
||||
<value>Vous êtes banni, contacter votre administrateur</value>
|
||||
</variable>
|
||||
</family>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
</constraints>
|
||||
|
||||
<help>
|
||||
</help>
|
||||
|
||||
</creole>
|
||||
\end{lstlisting}
|
||||
\chapter{Désactivation des éléments}
|
||||
|
||||
Si "activer\_ircd" est à "non" le service ne devrait plus être démarré, la famille ne doit plus être accessible et le fichier de configuration ne doit plus être généré :
|
||||
|
||||
\begin{lstlisting}
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<creole>
|
||||
|
||||
<files>
|
||||
<package>ircd-irc2</package>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}[language=XML]
|
||||
<service servicelist="ircd">ircd-irc2</service>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}
|
||||
<service_access service='ircd-irc2'>
|
||||
<port port_type="SymLinkOption">ircd_port</port>
|
||||
</service_access>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}[language=XML]
|
||||
<file filelist="ircd" name='/etc/ircd/ircd.conf'/>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}
|
||||
</files>
|
||||
|
||||
<variables>
|
||||
<family name='services'>
|
||||
<variable name='activer_ircd' type='oui/non' description="Activer le serveur IRC" >
|
||||
<value>oui</value>
|
||||
</variable>
|
||||
</family>
|
||||
<family name='services'>
|
||||
<variable name='activer_ircd' type='oui/non' description="Activer le serveur IRC" >
|
||||
<value>oui</value>
|
||||
</variable>
|
||||
</family>
|
||||
<family name='ircd'>
|
||||
<variable name='ircd_domaine' type='domain'
|
||||
description="Nom de domaine utilisé pour accéder au serveur IRC"/>
|
||||
<variable name='ircd_libelle' type='string' description="Libellé du serveur IRC"/>
|
||||
<variable name='ircd_port' type='port' description="Port du serveur IRC"
|
||||
mode='expert'>
|
||||
<value>6667</value>
|
||||
</variable>
|
||||
<variable name='ircd_banned_hostname' type='domain'
|
||||
description="Hote banni sur le serveur IRC" multi="True" mandatory="True"/>
|
||||
<variable name='ircd_banned_comment' type='string'
|
||||
description="Motif du bannissement du serveur IRC">
|
||||
<value>Vous êtes banni, contacter votre administrateur</value>
|
||||
</variable>
|
||||
</family>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}[language=XML]
|
||||
<condition name='disabled_if_in' source='activer_ircd'>
|
||||
<param>non</param>
|
||||
<target type='filelist'>ircd</target>
|
||||
<target type='servicelist'>ircd</target>
|
||||
<target type='family'>ircd</target>
|
||||
</condition>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}
|
||||
</constraints>
|
||||
|
||||
<help>
|
||||
</help>
|
||||
|
||||
</creole>
|
||||
\end{lstlisting}
|
||||
|
||||
\chapter{Test}
|
||||
|
||||
Lancer gen\_config.Dans l'onglet service tester si l'onglet "Ircd" disparait bien si "Activer le serveur IRC" est à "non" et réapparait si la valeur est à "oui".
|
||||
|
||||
Renseigner la valeur de la variable "Nom de domaine utilisé pour accéder au serveur IRC" à "localhost.localdomaine".
|
||||
|
||||
\chapter{Aide}
|
||||
|
||||
Ajouter de l'aide sur la variable activer\_ircd :
|
||||
|
||||
\begin{lstlisting}
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<creole>
|
||||
|
||||
<files>
|
||||
<package>ircd-irc2</package>
|
||||
<service servicelist="ircd">ircd-irc2</service>
|
||||
<service_access service='ircd-irc2'>
|
||||
<port port_type="SymLinkOption">ircd_port</port>
|
||||
</service_access>
|
||||
<file filelist="ircd" name='/etc/ircd/ircd.conf'/>
|
||||
</files>
|
||||
|
||||
<variables>
|
||||
<family name='services'>
|
||||
<variable name='activer_ircd' type='oui/non' description="Activer le serveur IRC" >
|
||||
<value>oui</value>
|
||||
</variable>
|
||||
</family>
|
||||
<family name='ircd'>
|
||||
<variable name='ircd_domaine' type='domain'
|
||||
description="Nom de domaine utilisé pour accéder au serveur IRC"/>
|
||||
<variable name='ircd_libelle' type='string' description="Libellé du serveur IRC"/>
|
||||
<variable name='ircd_port' type='port' description="Port du serveur IRC"
|
||||
mode='expert'>
|
||||
<value>6667</value>
|
||||
</variable>
|
||||
<variable name='ircd_banned_hostname' type='domain'
|
||||
description="Hote banni sur le serveur IRC" multi="True" mandatory="True"/>
|
||||
<variable name='ircd_banned_comment' type='string'
|
||||
description="Motif du bannissement du serveur IRC">
|
||||
<value>Vous êtes banni, contacter votre administrateur</value>
|
||||
</variable>
|
||||
</family>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
<condition name='disabled_if_in' source='activer_ircd'>
|
||||
<param>non</param>
|
||||
<target type='filelist'>ircd</target>
|
||||
<target type='servicelist'>ircd</target>
|
||||
<target type='family'>ircd</target>
|
||||
</condition>
|
||||
|
||||
</constraints>
|
||||
|
||||
<help>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}[language=XML]
|
||||
<variable name="activer_ircd">Cette variable permet d'activer un serveur IRC</variable>
|
||||
\end{lstlisting}
|
||||
\begin{lstlisting}
|
||||
</help>
|
||||
|
||||
</creole>
|
||||
\end{lstlisting}
|
||||
|
||||
\end{document}
|
Loading…
Reference in New Issue