Subversion Repositories ALCASAR

Rev

Rev 1685 | Rev 1696 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1685 Rev 1686
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 1685 2015-07-30 13:12:13Z richard $ 
2
#  $Id: alcasar.sh 1686 2015-07-30 13:37:16Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
 
5
 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
7
# Ce programme est un logiciel libre ; This software is free and open source
7
# Ce programme est un logiciel libre ; This software is free and open source
Line 249... Line 249...
249
	echo -n "."
249
	echo -n "."
250
 
250
 
251
# Test EXTIF config files
251
# Test EXTIF config files
252
	PUBLIC_IP_MASK=`ip addr show $EXTIF|grep "inet "|cut -d" " -f6`
252
	PUBLIC_IP_MASK=`ip addr show $EXTIF|grep "inet "|cut -d" " -f6`
253
	PUBLIC_IP=`echo $PUBLIC_IP_MASK | cut -d"/" -f1`
253
	PUBLIC_IP=`echo $PUBLIC_IP_MASK | cut -d"/" -f1`
254
	PUBLIC_GATEWAY=`ip route list|grep ^default|cut -d" " -f3`
254
	PUBLIC_GATEWAY=`ip route list|grep $EXTIF|grep ^default|cut -d" " -f3`
255
	if [ `echo $PUBLIC_IP|wc -c` -lt 7 ] || [ `echo $PUBLIC_GATEWAY|wc -c` -lt 7 ]
255
	if [ `echo $PUBLIC_IP|wc -c` -lt 7 ] || [ `echo $PUBLIC_GATEWAY|wc -c` -lt 7 ]
256
	then
256
	then
257
		if [ $Lang == "fr" ]
257
		if [ $Lang == "fr" ]
258
		then 
258
		then 
259
			echo "Échec"
259
			echo "Échec"
Line 276... Line 276...
276
		exit 0
276
		exit 0
277
	fi
277
	fi
278
	echo -n "."
278
	echo -n "."
279
 
279
 
280
# Test if router is alive (Box FAI)
280
# Test if router is alive (Box FAI)
281
	if [ `ip route list|grep -c ^default` -ne "1" ] ; then
281
	if [ `ip route list|grep $EXTIF|grep -c ^default` -ne "1" ] ; then
282
		if [ $Lang == "fr" ]
282
		if [ $Lang == "fr" ]
283
		then 
283
		then 
284
			echo "Échec"
284
			echo "Échec"
285
			echo "Vous n'avez pas configuré l'accès à Internet ou le câble réseau n'est pas sur la bonne carte."
285
			echo "Vous n'avez pas configuré l'accès à Internet ou le câble réseau n'est pas sur la bonne carte."
286
			echo "Réglez ce problème puis relancez ce script."
286
			echo "Réglez ce problème puis relancez ce script."