doc: fix references to init scripts
init.d support has been updated but the TeX files still reference some old contents. Fix all the `../script` folder references, avoid pointing to generated files (that, depending on the configure options, may or may not exist) and, while at it, refresh a bit the systemd/init.d documentations.
This commit is contained in:
parent
4dc942d789
commit
d31fe6db68
|
|
@ -2926,8 +2926,8 @@ before others) inside the init script code, LSB defines a special comment
|
|||
block. System tools can extract this information to insert the EtherCAT init
|
||||
script at the correct place in the startup sequence:
|
||||
|
||||
\lstinputlisting[firstline=38,lastline=48]
|
||||
{../script/init.d/ethercat}
|
||||
\lstinputlisting[firstline=36,lastline=46,basicstyle=\ttfamily\scriptsize]
|
||||
{../script/init.d/ethercat.in}
|
||||
|
||||
\subsection{Sysconfig File}
|
||||
\label{sec:sysconfig}
|
||||
|
|
@ -2939,8 +2939,8 @@ mandatory for the init script. The sysconfig file contains all configuration
|
|||
variables needed to operate one or more masters. The documentation is inside
|
||||
the file and included below:
|
||||
|
||||
\lstinputlisting[numbers=left,firstline=9,basicstyle=\ttfamily\scriptsize]
|
||||
{../script/sysconfig/ethercat}
|
||||
\lstinputlisting[numbers=left,firstline=11,basicstyle=\ttfamily\scriptsize,language=sh,escapechar={}]
|
||||
{../script/ethercat.conf}
|
||||
|
||||
For systems managed by systemd (see \autoref{sec:systemd}), the sysconfig file
|
||||
has moved to \lstinline+/etc/ethercat.conf+. Both versions are part of the
|
||||
|
|
@ -2976,19 +2976,18 @@ the EtherCAT master. It has to be executed with one of the parameters
|
|||
|
||||
Distributions using \textit{systemd} instead of the SysV init system are using service files to describe how a service is to be maintained. \autoref{lst:service} lists the master's service file:
|
||||
|
||||
\lstinputlisting[basicstyle=\ttfamily\footnotesize,caption=Service file,
|
||||
label=lst:service]{../script/ethercat.service}
|
||||
\lstinputlisting[basicstyle=\ttfamily\scriptsize,caption=Service file,label=lst:service]
|
||||
{../script/ethercat.service.in}
|
||||
|
||||
The \textit{ethercatctl} command is used to load and unload the master and
|
||||
The \textit{systemctl} command is used to load and unload the master and
|
||||
network driver modules in a similar way to the former init script
|
||||
(\autoref{sec:init}). Because it is installed into the \textit{sbin/}
|
||||
directory, it can also be used separately:
|
||||
(\autoref{sec:init}).
|
||||
|
||||
\begin{lstlisting}[gobble=2]
|
||||
# `\textbf{ethercatctl start}`
|
||||
# `\textbf{systemctl start ethercat}`
|
||||
\end{lstlisting}
|
||||
|
||||
When using systemd and/or the \textit{ethercatctl} command, the master
|
||||
When using systemd and/or the \textit{systemctl} command, the master
|
||||
configuration must be in \texttt{/etc/ethercat.conf} instead of
|
||||
\texttt{/etc/sysconfig/ethercat}! The latter is ignored. The configuration
|
||||
options are exactly the same.
|
||||
|
|
@ -3385,16 +3384,17 @@ Interface''.
|
|||
|
||||
\section{Installing the Software}
|
||||
|
||||
The below commands have to be entered as \textit{root}: The first one will
|
||||
install the EtherCAT header, init script, sysconfig file and the userspace
|
||||
The below commands have to be entered as \textit{root}: the first one will
|
||||
install the EtherCAT header, service scripts (systemd or init.d) and the userspace
|
||||
tool to the prefix path. The second one will install the kernel modules to the
|
||||
kernel's modules directory. The final \lstinline+depmod+ call is necessary to
|
||||
include the kernel modules into the \textit{modules.dep} file to make it
|
||||
available to the \lstinline+modprobe+ command, used in the init script.
|
||||
available to the \lstinline+modprobe+ command, used by the service scripts.
|
||||
|
||||
\begin{lstlisting}
|
||||
# `\textbf{make install}`
|
||||
# `\textbf{make modules\_install}`
|
||||
# `\textbf{depmod}`
|
||||
\end{lstlisting}
|
||||
|
||||
If the target kernel's modules directory is not under \textit{/lib/modules}, a
|
||||
|
|
@ -3408,21 +3408,6 @@ make variable. For example:
|
|||
This command will install the compiled kernel modules to
|
||||
\textit{/vol/nfs/root/lib/modules}, prepended by the kernel release.
|
||||
|
||||
If the EtherCAT master shall be run as a service\footnote{Even if the EtherCAT
|
||||
master shall not be loaded on system startup, the use of the init script is
|
||||
recommended for manual (un-)loading.} (see \autoref{sec:system}), the init
|
||||
script and the sysconfig file (or the systemd service file, respectively) have
|
||||
to be copied (or linked) to the appropriate locations. The below example is
|
||||
suitable for SUSE Linux. It may vary for other distributions.
|
||||
|
||||
% FIXME relative ln -s?
|
||||
\begin{lstlisting}
|
||||
# `\textbf{cd /opt/etherlab}`
|
||||
# `\textbf{cp etc/sysconfig/ethercat /etc/sysconfig/}`
|
||||
# `\textbf{ln -s etc/init.d/ethercat /etc/init.d/}`
|
||||
# `\textbf{insserv ethercat}`
|
||||
\end{lstlisting}
|
||||
|
||||
Now the sysconfig file \texttt{/etc/sysconfig/ethercat} (see
|
||||
\autoref{sec:sysconfig}), or the configuration file
|
||||
\textit{/etc/ethercat.conf}, if using systemd, has to be customized. The
|
||||
|
|
@ -3435,13 +3420,13 @@ After the basic configuration is done, the master can be started with the
|
|||
below command:
|
||||
|
||||
\begin{lstlisting}
|
||||
# `\textbf{/etc/init.d/ethercat start}`
|
||||
# `\textbf{systemctl start ethercat}`
|
||||
\end{lstlisting}
|
||||
|
||||
When using systemd, the following command can be used alternatively:
|
||||
When using init.d, the following command can be used alternatively:
|
||||
|
||||
\begin{lstlisting}
|
||||
# `\textbf{ethercatctl start}`
|
||||
# `\textbf{/etc/init.d/ethercat start}`
|
||||
\end{lstlisting}
|
||||
|
||||
At this time, the operation of the master can be observed by viewing the
|
||||
|
|
|
|||
|
|
@ -3117,8 +3117,8 @@ bloc sp\'ecial de commentaires. Les outils syst\`emes peuvent
|
|||
extraire cette information pour ins\'erer le script d'initialisation
|
||||
EtherCAT \`a la bonne position dans la s\'equence de d\'emarrage:
|
||||
|
||||
\lstinputlisting[firstline=38,lastline=48]
|
||||
{../script/init.d/ethercat}
|
||||
\lstinputlisting[firstline=36,lastline=46,basicstyle=\ttfamily\scriptsize]
|
||||
{../script/init.d/ethercat.in}
|
||||
|
||||
\subsection{Fichier sysconfig}
|
||||
\label{sec:sysconfig}
|
||||
|
|
@ -3131,8 +3131,8 @@ sysconfig contient toutes les variables de configuration requises pour
|
|||
op\'erer un ou plusieurs ma\^itres. La documentation se trouve dans le
|
||||
fichier et elle est reproduite ci-dessous:
|
||||
|
||||
\lstinputlisting[numbers=left,firstline=9,basicstyle=\ttfamily\scriptsize]
|
||||
{../script/sysconfig/ethercat}
|
||||
\lstinputlisting[numbers=left,firstline=11,basicstyle=\ttfamily\scriptsize,language=sh,escapechar={}]
|
||||
{../script/ethercat.conf}
|
||||
|
||||
Pour les syst\`emes g\'er\'es par systemd (voir \autoref{sec:systemd}),
|
||||
le fichier sysconfig a \'et\'e d\'eplac\'e dans \lstinline+/etc/ethercat.conf+.
|
||||
|
|
@ -3175,20 +3175,19 @@ d'initialisation SysV utilisent des fichiers de service pour d\'ecrire
|
|||
comment un service doit \^etre maintenu. \autoref{lst:service} liste
|
||||
le fichier de service du ma\^itre:
|
||||
|
||||
\lstinputlisting[basicstyle=\ttfamily\footnotesize,caption=Service
|
||||
file, label=lst:service]{../script/ethercat.service}
|
||||
\lstinputlisting[basicstyle=\ttfamily\scriptsize,caption=Service file,label=lst:service]
|
||||
{../script/ethercat.service.in}
|
||||
|
||||
La commande \textit{ethercatctl} est utilis\'ee pour charger et
|
||||
La commande \textit{systemctl} est utilis\'ee pour charger et
|
||||
d\'echarger le ma\^itre et les modules des pilotes r\'eseaux de la
|
||||
m\^eme mani\`ere que l'ancien script d'initialisation
|
||||
(\autoref{sec:init}). Puisqu'il est install\'e dans le dossier
|
||||
\textit{sbin/}, il peut aussi \^etre utilis\'e s\'epar\'ement:
|
||||
(\autoref{sec:init}).
|
||||
|
||||
\begin{lstlisting}[gobble=2]
|
||||
# `\textbf{ethercatctl start}`
|
||||
# `\textbf{systemctl start ethercat}`
|
||||
\end{lstlisting}
|
||||
|
||||
Lorsqu'on utilise systemd et/ou la commande \textit{ethercatctl}, le
|
||||
Lorsqu'on utilise systemd et/ou la commande \textit{systemctl}, le
|
||||
fichier de configuration du ma\^itre doit \^etre dans
|
||||
\texttt{/etc/ethercat.conf} au lieu de
|
||||
\texttt{/etc/sysconfig/ethercat}! Celui-ci est ignor\'e. Les options
|
||||
|
|
@ -3648,6 +3647,7 @@ script d'initialisation.
|
|||
\begin{lstlisting}
|
||||
# `\textbf{make install}`
|
||||
# `\textbf{make modules\_install}`
|
||||
# `\textbf{depmod}`
|
||||
\end{lstlisting}
|
||||
|
||||
Si le dossier de destination des modules noyaux ne se trouve dans
|
||||
|
|
@ -3662,23 +3662,6 @@ Ce commande installe les modules noyaux compil\'es dans
|
|||
\textit{/vol/nfs/root/lib/modules}, auquel on ajoute la version du
|
||||
noyau.
|
||||
|
||||
Si le ma\^itre EtherCAT doit s'ex\'ecuter en tant que
|
||||
service\footnote{ m\^eme si le ma\^itre EtherCAT ne doit pas \^etre
|
||||
charg\'e au d\'emarrage, l'utilisation du script d'initialisation
|
||||
est recommand\'e pour le (d\'e-)chargement manuel.} (voir
|
||||
\autoref{sec:system}), le script d'initialisation et le fichier
|
||||
sysconfig (ou le fichier de service systemd, respectivement) doivent
|
||||
\^etre copi\'es (ou li\'e) dans les emplacements appropri\'es.
|
||||
L'exemple ci-dessous convient pour SUSE Linux. Il peut \^etre
|
||||
diff\'erent pour les autres distributions.
|
||||
|
||||
% FIXME relative ln -s?
|
||||
\begin{lstlisting}
|
||||
# `\textbf{cd /opt/etherlab}`
|
||||
# `\textbf{cp etc/sysconfig/ethercat /etc/sysconfig/}`
|
||||
# `\textbf{ln -s etc/init.d/ethercat /etc/init.d/}`
|
||||
# `\textbf{insserv ethercat}`
|
||||
\end{lstlisting}
|
||||
|
||||
Maintenant le fichier de configuration
|
||||
\texttt{/etc/sysconfig/ethercat} (voir \autoref{sec:sysconfig}) ou
|
||||
|
|
@ -3694,14 +3677,14 @@ Apr\`es que la d\'efinition de la configuration de base, le ma\^itre
|
|||
peut \^etre d\'emarr\'e avec la commande ci-dessous:
|
||||
|
||||
\begin{lstlisting}
|
||||
# `\textbf{/etc/init.d/ethercat start}`
|
||||
# `\textbf{systemctl start ethercat}`
|
||||
\end{lstlisting}
|
||||
|
||||
Lorsqu'on utilise systemd, la commande suivante peut \^etre utilis\'ee
|
||||
Lorsqu'on utilise init.d, la commande suivante peut \^etre utilis\'ee
|
||||
\`a la place:
|
||||
|
||||
\begin{lstlisting}
|
||||
# `\textbf{ethercatctl start}`
|
||||
# `\textbf{/etc/init.d/ethercat start}`
|
||||
\end{lstlisting}
|
||||
|
||||
A partir de cet instant, l'op\'eration du ma\^itre peut \^etre oberv\'ee
|
||||
|
|
|
|||
Loading…
Reference in New Issue