Translate comments in scripts.
This commit is contained in:
parent
fbacbd9987
commit
0f4125cc2e
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=18859
1 changed files with 87 additions and 87 deletions
|
@ -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ôle de flux matériel
|
||||
modem # liaison par modem
|
||||
noipdefault # adresse IP affectée par le serveur PPP distant
|
||||
# si la machine distante ne vous donne pas d'adresse
|
||||
# IP lors de la négociation IPCP, retirez cette option
|
||||
passive # attendre les paquets LCP
|
||||
domain ppp.foo.com # mettre ici votre nom de domaine
|
||||
|
||||
:<remote_ip> # 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 <local_ip>:<remote_ip>
|
||||
:<remote_ip> # mettre ici l'adresse IP de la machine PPP distante
|
||||
# elle servira à router des paquets via la liaison PPP
|
||||
# si vous n'avez pas précisé l'option noipdefault
|
||||
# changez cette ligne en <ip_locale>:<ip_distante>
|
||||
|
||||
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é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ê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ê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ê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ê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é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ériphé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ôle de flux maté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 <your.domain> # put your domain name here
|
||||
noipdefault # adresse IP affectée par le serveur PPP distant
|
||||
# si la machine distante ne vous donne pas d'adresse
|
||||
# IP lors de la négociation IPCP, retirer cette option
|
||||
passive # attendre les paquets LCP
|
||||
domain <your.domain> # 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 <local_ip>:<remote_ip>
|
||||
: # mettre ici l'adresse IP de la machine PPP distante
|
||||
# elle servira à router des paquets via la liaison PPP
|
||||
# si vous n'avez pas précisé l'option noipdefault
|
||||
# modifier cette ligne en <ip_locale>:<ip_distante>
|
||||
|
||||
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é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<phone.number>
|
||||
CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: <login-id>
|
||||
TIMEOUT 5 sword: <password></programlisting>
|
||||
<programlisting>ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<numéro_de_téléphone>
|
||||
CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: <nom_d_utilisateur>
|
||||
TIMEOUT 5 sword: <mot_de_passe></programlisting>
|
||||
|
||||
<para>Une fois que ces fichiers sont installés et
|
||||
correctement modifié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 être
|
||||
semblable à 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ôle de flux matériel
|
||||
netmask 255.255.255.0 # masque de sous-réseau (facultatif)
|
||||
192.114.208.20:192.114.208.165 # adresses IP des machines locales et distantes
|
||||
# l'adresse locale ne doit pas être la même que
|
||||
# celle que vous avez assignée à l'interface
|
||||
# Ethernet (ou autre) de la machine.
|
||||
# l'adresse IP de la machine distante est
|
||||
# l'adresse IP qui lui sera affectée
|
||||
domain ppp.foo.com # votre nom de domaine
|
||||
passive # attendre LCP
|
||||
modem # liaison modem</programlisting>
|
||||
|
||||
<para>La procédure <filename>/etc/ppp/pppserv</filename>
|
||||
ci-dessous demandera à <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ê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êt de kermit, PID=' ${pid}
|
||||
kill -9 ${pid}
|
||||
fi
|
||||
|
||||
# reset ppp interface
|
||||
# réinitialiser l'interface ppp
|
||||
ifconfig ppp0 down
|
||||
ifconfig ppp0 delete
|
||||
|
||||
# enable autoanswer mode
|
||||
# activer le mode réponse automatique
|
||||
kermit -y /etc/ppp/kermit.ans
|
||||
|
||||
# run ppp
|
||||
# lancer ppp
|
||||
pppd /dev/tty01 19200</programlisting>
|
||||
|
||||
<para>Utilisez cette procé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ê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ê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ésactiver
|
||||
; le mode ré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érie à laquelle est raccordé 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écessaire,
|
||||
set dial display on ; puis SET DIAL si né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ée
|
||||
pause 1
|
||||
output +++ ; hayes escape sequence
|
||||
input 1 OK\13\10 ; wait for OK
|
||||
output +++ ; séquence d'é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épond pas OK, réessayer
|
||||
|
||||
:slhup ; hang up the phone
|
||||
clear ; Clear unread characters from input buffer
|
||||
:slhup ; raccrocher la ligne
|
||||
clear ; vider le tampon d'entré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éponse OK, passer le modem en mode commande
|
||||
|
||||
:sldial ; dial the number
|
||||
:sldial ; composer le numé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éro de téléphone
|
||||
assign \%x 0 ; mettre le compteur à zéro
|
||||
|
||||
:look
|
||||
clear ; Clear unread characters from input buffer
|
||||
increment \%x ; Count the seconds
|
||||
clear ; vider le tampon d'entré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 à zé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é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ès 10 é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é. Vérifiez votre ligne téléphonique!\7
|
||||
exit 1
|
||||
|
||||
; local variables:
|
||||
|
|
Loading…
Reference in a new issue