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