[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Script que testa a conexão
From: |
Luis Gustavo |
Subject: |
Script que testa a conexão |
Date: |
Mon, 26 Jun 2006 16:34:00 -0300 |
Boa tarde,
Tenho um script que testa a conexão da ppp0.
WVDIAL=`LANG=LC_ALL= /sbin/ifconfig ppp0 | cut -d : -f 1 | cut -d ' ' -f 1`;
WVDIAL=`echo $WVDIAL`|cut -c 1-4
echo $WVDIAL
if [ $WVDIAL = "ppp0" ];then
echo "NAO É PRECISO RECONECTAR"
else
/etc/rc.d/init.d/testa_conexao.sh restart
fi
Quando a conexão está OK, ou seja, existe a conexão ppp0 o script retorna NAO É
PRECISO RECONECTAR.
Quando a conexão cai, aparece um "erro" no meu IF
ppp0: error fetching interface information: Device not found
./testa_conexao.sh: [: =: unary operator expected
isso é normal ?
Grato
LG
[As partes desta mensagem que não continham texto foram removidas]