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
|
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ôle de flux matériel
|
||||||
modem # modem control line
|
modem # liaison par modem
|
||||||
noipdefault # remote PPP server must supply your IP address.
|
noipdefault # adresse IP affecté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é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
|
||||||
|
|
||||||
:<remote_ip> # put the IP of remote PPP host here
|
:<remote_ip> # mettre ici l'adresse IP de la machine PPP distante
|
||||||
# it will be used to route packets via PPP link
|
# elle servira à router des paquets via la liaison PPP
|
||||||
# if you didn't specified the noipdefault option
|
# si vous n'avez pas précisé l'option noipdefault
|
||||||
# change this line to <local_ip>:<remote_ip>
|
# changez cette ligne en <ip_locale>:<ip_distante>
|
||||||
|
|
||||||
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é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ê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ê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ê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ê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é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ériphé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ôle de flux maté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é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égociation IPCP, retirer cette option
|
||||||
passive # wait for LCP packets
|
passive # attendre les paquets LCP
|
||||||
domain <your.domain> # put your domain name here
|
domain <your.domain> # 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 à router des paquets via la liaison PPP
|
||||||
# if you didn't specified the noipdefault option
|
# si vous n'avez pas précisé l'option noipdefault
|
||||||
# change this line to <local_ip>:<remote_ip>
|
# modifier cette ligne en <ip_locale>:<ip_distante>
|
||||||
|
|
||||||
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é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<phone.number>
|
<programlisting>ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<numéro_de_téléphone>
|
||||||
CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: <login-id>
|
CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: <nom_d_utilisateur>
|
||||||
TIMEOUT 5 sword: <password></programlisting>
|
TIMEOUT 5 sword: <mot_de_passe></programlisting>
|
||||||
|
|
||||||
<para>Une fois que ces fichiers sont installés et
|
<para>Une fois que ces fichiers sont installés et
|
||||||
correctement modifiés, tout ce dont vous avez besoin de
|
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
|
<filename>/etc/ppp/options</filename> devrait être
|
||||||
semblable à ce qui suit:</para>
|
semblable à ce qui suit:</para>
|
||||||
|
|
||||||
<programlisting>crtscts # Hardware flow control
|
<programlisting>crtscts # contrôle de flux matériel
|
||||||
netmask 255.255.255.0 # netmask ( not required )
|
netmask 255.255.255.0 # masque de sous-ré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 être la même que
|
||||||
# you assigned to the ethernet ( or other )
|
# celle que vous avez assignée à 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é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édure <filename>/etc/ppp/pppserv</filename>
|
<para>La procédure <filename>/etc/ppp/pppserv</filename>
|
||||||
ci-dessous demandera à <application>pppd</application>
|
ci-dessous demandera à <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ê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êt de kermit, PID=' ${pid}
|
||||||
kill -9 ${pid}
|
kill -9 ${pid}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# reset ppp interface
|
# réinitialiser l'interface ppp
|
||||||
ifconfig ppp0 down
|
ifconfig ppp0 down
|
||||||
ifconfig ppp0 delete
|
ifconfig ppp0 delete
|
||||||
|
|
||||||
# enable autoanswer mode
|
# activer le mode ré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édure
|
<para>Utilisez cette procé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ê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ê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ésactiver
|
||||||
; autoanswer mod
|
; le mode ré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érie à laquelle est raccordé 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écessaire,
|
||||||
set dial display on ; Then SET DIAL if necessary,
|
set dial display on ; puis SET DIAL si né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ée
|
||||||
pause 1
|
pause 1
|
||||||
output +++ ; hayes escape sequence
|
output +++ ; séquence d'é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épond pas OK, réessayer
|
||||||
|
|
||||||
:slhup ; hang up the phone
|
:slhup ; raccrocher la ligne
|
||||||
clear ; Clear unread characters from input buffer
|
clear ; vider le tampon d'entré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éponse OK, passer le modem en mode commande
|
||||||
|
|
||||||
:sldial ; dial the number
|
:sldial ; composer le numé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éro de téléphone
|
||||||
assign \%x 0 ; zero the time counter
|
assign \%x 0 ; mettre le compteur à zéro
|
||||||
|
|
||||||
:look
|
:look
|
||||||
clear ; Clear unread characters from input buffer
|
clear ; vider le tampon d'entré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 à zé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é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ès 10 é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é. Vérifiez votre ligne téléphonique!\7
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
; local variables:
|
; local variables:
|
||||||
|
|
Loading…
Reference in a new issue