Modérateur: modos Ixus
Sep 17 17:25:13 sme-v601 kernel: NETDEV WATCHDOG: eth1: transmit timed out
Sep 17 17:25:13 sme-v601 kernel: [Adi] Transmit timed out!
Sep 17 17:25:13 sme-v601 kernel: [Adi] transmit URB c4c190bc cancelled
Sep 17 17:25:27 sme-v601 kernel: [adi] Modem operational !!
Sep 17 10:02:40 sme-v601 kernel: [Adi] transmit error with URB status -110
*/10 * * * * root /usr/local/bin/reco-pppoa &
#!/bin/sh
# By Baz (Merci à lui!)
LOCKFILE=/var/lock/subsys/pppoa
#Check IPs from ifconfig
getip()
{
IP=`/sbin/ifconfig ppp0 | fgrep "inet ad" | cut -f2 -d":" | cut -f1 -d" "`
}
getstatus()
{
STAT=`cat $LOCKFILE`
}
#Check if ppp0 is up, if not, restart the connction
getip
#Pas d'ip on n'est pas connecter
if ! [ "$IP" ]; then
#Verification du status du process
getstatus
if [ "$STAT" = "FIRSTRESTART" ]; then
#Le premier redemarrage n'a rien donné
#on essaye plus violent
/etc/rc.d/init.d/pppoa hardrestart &
exit
else
# Premier redemarrage
echo "FIRSTRESTART" > $LOCKFILE
/etc/rc.d/init.d/pppoa restart &
exit
fi
else
#ON est connecter
#Verification du status pour savoir si il faut mettre le fichier à blanc
echo > $LOCKFILE
fi
#!/bin/sh
# Description : Starts and stops an ADSL connection (PPPoA) #/etc/rc.d/init.d/pppoa
LOG=/var/log/adsl
getip()
{
IP=`/sbin/ifconfig ppp0 | fgrep "inet ad" | cut -f2 -d":" | cut -f1 -d" "`
}
killallprocess()
{
for i in `pidof pppoa3`
do
kill -9 $i
done
for i in `pidof pppd`
do
kill -9 $i
done
for i in `pidof modem_run`
do
kill -9 $i
done
}
start()
{
echo -n "Starting pppoa (version 3) :"
echo $(date)" : Loading USB modules ..." >> $LOG
rmmod usb-uhci
modprobe usb-uhci
mount -t usbdevfs none /proc/bus/usb
sleep 2
echo $(date)" : Loading microcode ..." >> $LOG
/usr/local/bin/modem_run -f /usr/local/bin/mgmt.o -m
echo $(date)" : Microcode loaded" >> $LOG
modprobe n_hdlc
route del default
echo $(date)" : Running pppd" >> $LOG
/usr/sbin/pppd call adsl
echo $(date)" : ADSL Started" >> $LOG
sleep 20
# relance de snort pour nouvelle IP
/etc/rc.d/init.d/snortd restart
/etc/rc.d/init.d/guardiand restart
/etc/rc.d/init.d/bwbar restart
}
stop()
{
echo -n "Shutting down pppoa (version 3) : "
echo $(date)" : Killing pppd ..." >> $LOG
killproc pppd
echo $(date)" : ADSL Stopped" >> $LOG
}
restart()
{
echo $(date)" : Restarting ADSL connection ..." >> $LOG
echo $(date)" : Killing pppd ..." >> $LOG
killproc pppd
echo $(date)" : pppd killed" >> $LOG
sleep 2
echo $(date)" : Starting pppd" >> $LOG
route del default
/usr/sbin/pppd call adsl
echo $(date)" : ADSL Started" >> $LOG
sleep 20
}
hardrestart()
{
echo $(date)" : HARDKilling pppd ..." >> $LOG
killallprocess
echo $(date)" : Wait 1 min before reconnect ..." >> $LOG
sleep 30
echo $(date)" : Starting normal service ..." >> $LOG
start
}
. /etc/rc.d/init.d/functions
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
hardrestart)
hardrestart
;;
*) echo "Usage: $0 { start,stop,restart,hardrestart }"
exit 1
esac
exit 0
Oct 1 11:30:26 sme-v601 kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000
Oct 1 11:30:26 sme-v601 kernel: printing eip:
Retour vers E-Smith / SME Server
Utilisateur(s) parcourant actuellement ce forum : Aucun utilisateur inscrit et 1 invité