| Line 1... |
Line 1... |
| 1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
| 2 |
# $Id: alcasar.sh 977 2012-08-15 17:32:25Z richard $
|
2 |
# $Id: alcasar.sh 978 2012-08-15 20:24:56Z franck $
|
| 3 |
|
3 |
|
| 4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
| 5 |
|
5 |
|
| 6 |
# ALCASAR - Portail captif d'accès à l'Internet - Copyright (C) [2005] [ALcasar team - Rexy - 3abtux - ...]
|
6 |
# ALCASAR - Portail captif d'accès à l'Internet - Copyright (C) [2005] [ALcasar team - Rexy - 3abtux - ...]
|
| 7 |
# Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier au titre des clauses de la Licence Publique Générale GNU,
|
7 |
# Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier au titre des clauses de la Licence Publique Générale GNU,
|
| Line 169... |
Line 169... |
| 169 |
echo "Resolv this problem, then restart this script."
|
169 |
echo "Resolv this problem, then restart this script."
|
| 170 |
fi
|
170 |
fi
|
| 171 |
exit 0
|
171 |
exit 0
|
| 172 |
fi
|
172 |
fi
|
| 173 |
echo -n "."
|
173 |
echo -n "."
|
| 174 |
# On traite le cas où l'interface configurée lors de l'installation est "eth1" au lieu de "eth0" (mystère sur certaines version de BIOS et de VirtualBox)
|
174 |
# On traite le cas où l'interface configurée lors de l'installation est "eth1" au lieu de "eth0" (mystère sur certaines versions de BIOS et de VirtualBox)
|
| 175 |
if [ `ip route list|grep ^default|grep -c eth1` -eq "1" ] ; then
|
175 |
if [ `ip route list|grep ^default|grep -c eth1` -eq "1" ] ; then
|
| 176 |
if [ $Lang == "fr" ]
|
176 |
if [ $Lang == "fr" ]
|
| 177 |
then echo "La configuration des cartes réseau va être corrigée."
|
177 |
then echo "La configuration des cartes réseau va être corrigée."
|
| 178 |
else echo "The Ethernet card configuration will be corrected."
|
178 |
else echo "The Ethernet card configuration will be corrected."
|
| 179 |
fi
|
179 |
fi
|
| Line 193... |
Line 193... |
| 193 |
else echo "You can restart this script."
|
193 |
else echo "You can restart this script."
|
| 194 |
fi
|
194 |
fi
|
| 195 |
exit 0
|
195 |
exit 0
|
| 196 |
fi
|
196 |
fi
|
| 197 |
echo -n "."
|
197 |
echo -n "."
|
| 198 |
# On test le lien vers le routeur par default
|
198 |
# On teste le lien vers le routeur par defaut
|
| 199 |
IP_GW=`ip route list|grep ^default|cut -d" " -f3`
|
199 |
IP_GW=`ip route list|grep ^default|cut -d" " -f3`
|
| 200 |
arp_reply=`/usr/sbin/arping -b -I$EXTIF -c1 -w2 $IP_GW|grep response|cut -d" " -f2`
|
200 |
arp_reply=`/usr/sbin/arping -b -I$EXTIF -c1 -w2 $IP_GW|grep response|cut -d" " -f2`
|
| 201 |
if [ $(expr $arp_reply) -eq 0 ]
|
201 |
if [ $(expr $arp_reply) -eq 0 ]
|
| 202 |
then
|
202 |
then
|
| 203 |
if [ $Lang == "fr" ]
|
203 |
if [ $Lang == "fr" ]
|