Translate comments in scripts.

This commit is contained in:
Marc Fonvieille 2003-11-15 17:26:35 +00:00
parent fbacbd9987
commit 0f4125cc2e
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=18859

View file

@ -198,21 +198,21 @@
pourrait être utilisé pour se connecter à la pourrait être utilisé pour se connecter à la
liaison PPP d'un concentrateur Cisco:</para> liaison PPP d'un concentrateur Cisco:</para>
<programlisting>crtscts # enable hardware flow control <programlisting>crtscts # contr&ocirc;le de flux mat&eacute;riel
modem # modem control line modem # liaison par modem
noipdefault # remote PPP server must supply your IP address. noipdefault # adresse IP affect&eacute;e par le serveur PPP distant
# if the remote host does not send your IP during IPCP # si la machine distante ne vous donne pas d'adresse
# negotiation, remove this option # IP lors de la n&eacute;gociation IPCP, retirez cette option
passive # wait for LCP packets passive # attendre les paquets LCP
domain ppp.foo.com # put your domain name here domain ppp.foo.com # mettre ici votre nom de domaine
:&lt;remote_ip&gt; # put the IP of remote PPP host here :&lt;remote_ip&gt; # mettre ici l'adresse IP de la machine PPP distante
# it will be used to route packets via PPP link # elle servira &agrave; router des paquets via la liaison PPP
# if you didn't specified the noipdefault option # si vous n'avez pas pr&eacute;cis&eacute; l'option noipdefault
# change this line to &lt;local_ip&gt;:&lt;remote_ip&gt; # changez cette ligne en &lt;ip_locale&gt;:&lt;ip_distante&gt;
defaultroute # put this if you want that PPP server will be your defaultroute # mettre cette ligne si vous voulez que le serveur PPP soit
# default router</programlisting> # votre routeur par d&eacute;faut</programlisting>
<para>Pour se connecter:</para> <para>Pour se connecter:</para>
@ -256,13 +256,13 @@ defaultroute # put this if you want that PPP server will be your
ps ax |grep pppd |grep -v grep ps ax |grep pppd |grep -v grep
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'` pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
if [ "X${pid}" != "X" ] ; then if [ "X${pid}" != "X" ] ; then
echo 'killing pppd, PID=' ${pid} echo 'arr&ecirc;t de pppd, PID=' ${pid}
kill ${pid} kill ${pid}
fi fi
ps ax |grep kermit |grep -v grep ps ax |grep kermit |grep -v grep
pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'` pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'`
if [ "X${pid}" != "X" ] ; then if [ "X${pid}" != "X" ] ; then
echo 'killing kermit, PID=' ${pid} echo 'arr&ecirc;t de kermit, PID=' ${pid}
kill -9 ${pid} kill -9 ${pid}
fi fi
@ -287,14 +287,14 @@ pppd /dev/tty01 19200</programlisting>
<programlisting>#!/bin/sh <programlisting>#!/bin/sh
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'` pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
if [ X${pid} != "X" ] ; then if [ X${pid} != "X" ] ; then
echo 'killing pppd, PID=' ${pid} echo 'arr&ecirc;t de pppd, PID=' ${pid}
kill -TERM ${pid} kill -TERM ${pid}
fi fi
ps ax |grep kermit |grep -v grep ps ax |grep kermit |grep -v grep
pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'` pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'`
if [ "X${pid}" != "X" ] ; then if [ "X${pid}" != "X" ] ; then
echo 'killing kermit, PID=' ${pid} echo 'arr&ecirc;t de kermit, PID=' ${pid}
kill -9 ${pid} kill -9 ${pid}
fi fi
@ -311,9 +311,9 @@ kermit -y /etc/ppp/kermit.hup
<programlisting>#!/bin/sh <programlisting>#!/bin/sh
pid=`ps ax| grep pppd |grep -v grep|awk '{print $1;}'` pid=`ps ax| grep pppd |grep -v grep|awk '{print $1;}'`
if [ X${pid} != "X" ] ; then if [ X${pid} != "X" ] ; then
echo 'pppd running: PID=' ${pid-NONE} echo 'pppd actif: PID=' ${pid-NONE}
else else
echo 'No pppd running.' echo 'Pas de pppd en cours d'ex&eacute;cution.'
fi fi
set -x set -x
netstat -n -I ppp0 netstat -n -I ppp0
@ -323,7 +323,7 @@ ifconfig ppp0</programlisting>
<filename>/etc/ppp/kermit.hup</filename>, qui devrait <filename>/etc/ppp/kermit.hup</filename>, qui devrait
contenir:</para> contenir:</para>
<programlisting>set line /dev/tty01 ; put your modem device here <programlisting>set line /dev/tty01 ; mettre ici le p&eacute;riph&eacute;rique pour votre modem
set speed 19200 set speed 19200
set file type binary set file type binary
set file names literal set file names literal
@ -354,22 +354,22 @@ exit</programlisting>
<programlisting>/dev/cuaa1 115200 <programlisting>/dev/cuaa1 115200
crtscts # enable hardware flow control crtscts # contr&ocirc;le de flux mat&eacute;riel
modem # modem control line modem # liaison par modem
connect "/usr/bin/chat -f /etc/ppp/login.chat.script" connect "/usr/bin/chat -f /etc/ppp/login.chat.script"
noipdefault # remote PPP serve must supply your IP address. noipdefault # adresse IP affect&eacute;e par le serveur PPP distant
# if the remote host doesn't send your IP during # si la machine distante ne vous donne pas d'adresse
# IPCP negotiation, remove this option # IP lors de la n&eacute;gociation IPCP, retirer cette option
passive # wait for LCP packets passive # attendre les paquets LCP
domain &lt;your.domain&gt; # put your domain name here domain &lt;your.domain&gt; # mettre ici votre nom de domaine
: # put the IP of remote PPP host here : # mettre ici l'adresse IP de la machine PPP distante
# it will be used to route packets via PPP link # elle servira &agrave; router des paquets via la liaison PPP
# if you didn't specified the noipdefault option # si vous n'avez pas pr&eacute;cis&eacute; l'option noipdefault
# change this line to &lt;local_ip&gt;:&lt;remote_ip&gt; # modifier cette ligne en &lt;ip_locale&gt;:&lt;ip_distante&gt;
defaultroute # put this if you want that PPP server will be defaultroute # mettre cette ligne si vous voulez que le serveur PPP soit
# your default router</programlisting> # votre routeur par d&eacute;faut</programlisting>
<para><filename>/etc/ppp/login.chat.script</filename>:</para> <para><filename>/etc/ppp/login.chat.script</filename>:</para>
@ -378,9 +378,9 @@ defaultroute # put this if you want that PPP server will be
ligne.</para> ligne.</para>
</note> </note>
<programlisting>ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT&lt;phone.number&gt; <programlisting>ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT&lt;num&eacute;ro_de_t&eacute;l&eacute;phone&gt;
CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: &lt;login-id&gt; CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: &lt;nom_d_utilisateur&gt;
TIMEOUT 5 sword: &lt;password&gt;</programlisting> TIMEOUT 5 sword: &lt;mot_de_passe&gt;</programlisting>
<para>Une fois que ces fichiers sont install&eacute;s et <para>Une fois que ces fichiers sont install&eacute;s et
correctement modifi&eacute;s, tout ce dont vous avez besoin de correctement modifi&eacute;s, tout ce dont vous avez besoin de
@ -397,17 +397,17 @@ defaultroute # put this if you want that PPP server will be
<filename>/etc/ppp/options</filename> devrait &ecirc;tre <filename>/etc/ppp/options</filename> devrait &ecirc;tre
semblable &agrave; ce qui suit:</para> semblable &agrave; ce qui suit:</para>
<programlisting>crtscts # Hardware flow control <programlisting>crtscts # contr&ocirc;le de flux mat&eacute;riel
netmask 255.255.255.0 # netmask ( not required ) netmask 255.255.255.0 # masque de sous-r&eacute;seau (facultatif)
192.114.208.20:192.114.208.165 # ip's of local and remote hosts 192.114.208.20:192.114.208.165 # adresses IP des machines locales et distantes
# local ip must be different from one # l'adresse locale ne doit pas &ecirc;tre la m&ecirc;me que
# you assigned to the ethernet ( or other ) # celle que vous avez assign&eacute;e &agrave; l'interface
# interface on your machine. # Ethernet (ou autre) de la machine.
# remote IP is ip address that will be # l'adresse IP de la machine distante est
# assigned to the remote machine # l'adresse IP qui lui sera affect&eacute;e
domain ppp.foo.com # your domain domain ppp.foo.com # votre nom de domaine
passive # wait for LCP passive # attendre LCP
modem # modem line</programlisting> modem # liaison modem</programlisting>
<para>La proc&eacute;dure <filename>/etc/ppp/pppserv</filename> <para>La proc&eacute;dure <filename>/etc/ppp/pppserv</filename>
ci-dessous demandera &agrave; <application>pppd</application> ci-dessous demandera &agrave; <application>pppd</application>
@ -417,24 +417,24 @@ modem # modem line</programlisting>
ps ax |grep pppd |grep -v grep ps ax |grep pppd |grep -v grep
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'` pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
if [ "X${pid}" != "X" ] ; then if [ "X${pid}" != "X" ] ; then
echo 'killing pppd, PID=' ${pid} echo 'arr&ecirc;t de pppd, PID=' ${pid}
kill ${pid} kill ${pid}
fi fi
ps ax |grep kermit |grep -v grep ps ax |grep kermit |grep -v grep
pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'` pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'`
if [ "X${pid}" != "X" ] ; then if [ "X${pid}" != "X" ] ; then
echo 'killing kermit, PID=' ${pid} echo 'arr&ecirc;t de kermit, PID=' ${pid}
kill -9 ${pid} kill -9 ${pid}
fi fi
# reset ppp interface # r&eacute;initialiser l'interface ppp
ifconfig ppp0 down ifconfig ppp0 down
ifconfig ppp0 delete ifconfig ppp0 delete
# enable autoanswer mode # activer le mode r&eacute;ponse automatique
kermit -y /etc/ppp/kermit.ans kermit -y /etc/ppp/kermit.ans
# run ppp # lancer ppp
pppd /dev/tty01 19200</programlisting> pppd /dev/tty01 19200</programlisting>
<para>Utilisez cette proc&eacute;dure <para>Utilisez cette proc&eacute;dure
@ -445,13 +445,13 @@ pppd /dev/tty01 19200</programlisting>
ps ax |grep pppd |grep -v grep ps ax |grep pppd |grep -v grep
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'` pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
if [ "X${pid}" != "X" ] ; then if [ "X${pid}" != "X" ] ; then
echo 'killing pppd, PID=' ${pid} echo 'arr&ecirc;t de pppd, PID=' ${pid}
kill ${pid} kill ${pid}
fi fi
ps ax |grep kermit |grep -v grep ps ax |grep kermit |grep -v grep
pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'` pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'`
if [ "X${pid}" != "X" ] ; then if [ "X${pid}" != "X" ] ; then
echo 'killing kermit, PID=' ${pid} echo 'arr&ecirc;t de kermit, PID=' ${pid}
kill -9 ${pid} kill -9 ${pid}
fi fi
ifconfig ppp0 down ifconfig ppp0 down
@ -482,8 +482,8 @@ inp 5 OK
out ATH0\13 out ATH0\13
inp 5 OK inp 5 OK
echo \13 echo \13
out ATS0=1\13 ; change this to out ATS0=0\13 if you want to disable out ATS0=1\13 ; remplacer cela par ATS0=0\13 si vous voulez d&eacute;sactiver
; autoanswer mod ; le mode r&eacute;ponse automatique
inp 5 OK inp 5 OK
echo \13 echo \13
exit</programlisting> exit</programlisting>
@ -498,14 +498,14 @@ exit</programlisting>
distante.</para> distante.</para>
<programlisting>; <programlisting>;
; put the com line attached to the modem here: ; mettre ici la liaison s&eacute;rie &agrave; laquelle est raccord&eacute; le modem:
; ;
set line /dev/tty01 set line /dev/tty01
; ;
; put the modem speed here: ; mettre ici la vitesse du modem:
; ;
set speed 19200 set speed 19200
set file type binary ; full 8 bit file xfer set file type binary ; transfert 8 bits
set file names literal set file names literal
set win 8 set win 8
set rec pack 1024 set rec pack 1024
@ -516,44 +516,44 @@ set command bytesize 8
set flow none set flow none
set modem hayes set modem hayes
set dial hangup off set dial hangup off
set carrier auto ; Then SET CARRIER if necessary, set carrier auto ; puis SET CARRIER si n&eacute;cessaire,
set dial display on ; Then SET DIAL if necessary, set dial display on ; puis SET DIAL si n&eacute;cessaire,
set input echo on set input echo on
set input timeout proceed set input timeout proceed
set input case ignore set input case ignore
def \%x 0 ; login prompt counter def \%x 0 ; compteur d'ouverture de session
goto slhup goto slhup
:slcmd ; put the modem in command mode :slcmd ; mettre le modem en mode commande
echo Put the modem in command mode. echo Put the modem in command mode.
clear ; Clear unread characters from input buffer clear ; vider le tampon d'entr&eacute;e
pause 1 pause 1
output +++ ; hayes escape sequence output +++ ; s&eacute;quence d'&eacute;chappement Hayes
input 1 OK\13\10 ; wait for OK input 1 OK\13\10 ; attendre OK
if success goto slhup if success goto slhup
output \13 output \13
pause 1 pause 1
output at\13 output at\13
input 1 OK\13\10 input 1 OK\13\10
if fail goto slcmd ; if modem doesn't answer OK, try again if fail goto slcmd ; si le modem ne r&eacute;pond pas OK, r&eacute;essayer
:slhup ; hang up the phone :slhup ; raccrocher la ligne
clear ; Clear unread characters from input buffer clear ; vider le tampon d'entr&eacute;e
pause 1 pause 1
echo Hanging up the phone. echo Hanging up the phone.
output ath0\13 ; hayes command for on hook output ath0\13 ; commande Hayes pour raccrocher
input 2 OK\13\10 input 2 OK\13\10
if fail goto slcmd ; if no OK answer, put modem in command mode if fail goto slcmd ; si pas de r&eacute;ponse OK, passer le modem en mode commande
:sldial ; dial the number :sldial ; composer le num&eacute;ro
pause 1 pause 1
echo Dialing. echo Dialing.
output atdt9,550311\13\10 ; put phone number here output atdt9,550311\13\10 ; mettre ici le num&eacute;ro de t&eacute;l&eacute;phone
assign \%x 0 ; zero the time counter assign \%x 0 ; mettre le compteur &agrave; z&eacute;ro
:look :look
clear ; Clear unread characters from input buffer clear ; vider le tampon d'entr&eacute;e
increment \%x ; Count the seconds increment \%x ; compter les secondes
input 1 {CONNECT } input 1 {CONNECT }
if success goto sllogin if success goto sllogin
reinput 1 {NO CARRIER\13\10} reinput 1 {NO CARRIER\13\10}
@ -567,14 +567,14 @@ if success goto slhup
if < \%x 60 goto look if < \%x 60 goto look
else goto slhup else goto slhup
:sllogin ; login :sllogin ; ouverture de session
assign \%x 0 ; zero the time counter assign \%x 0 ; mettre le compteur &agrave; z&eacute;ro
pause 1 pause 1
echo Looking for login prompt. echo Looking for login prompt.
:slloop :slloop
increment \%x ; Count the seconds increment \%x ; compter les secondes
clear ; Clear unread characters from input buffer clear ; vider le tampon d'entr&eacute;e
output \13 output \13
; ;
; put your expected login prompt here: ; put your expected login prompt here:
@ -585,25 +585,25 @@ reinput 1 {\255}
if success goto slhup if success goto slhup
reinput 1 {\127} reinput 1 {\127}
if success goto slhup if success goto slhup
if < \%x 10 goto slloop ; try 10 times to get a login prompt if < \%x 10 goto slloop ; essayer 10 fois d'obtenir une invite de session
else goto slhup ; hang up and start again if 10 failures else goto slhup ; raccrocher et recommencer apr&egrave;s 10 &eacute;checs
:sluid :sluid
; ;
; put your userid here: ; mettre ici votre nom d'utilisateur:
; ;
output ppp-login\13 output nom-d-utilisateur-ppp\13
input 1 {Password: } input 1 {Password: }
; ;
; put your password here: ; mettre ici votre mot de passe:
; ;
output ppp-password\13 output mot-de-passe-ppp\13
input 1 {Entering SLIP mode.} input 1 {Entering SLIP mode.}
echo echo
quit quit
:slnodial :slnodial
echo \7No dialtone. Check the telephone line!\7 echo \7Pas de tonalit&eacute;. V&eacute;rifiez votre ligne t&eacute;l&eacute;phonique!\7
exit 1 exit 1
; local variables: ; local variables: