Subversion Repositories ALCASAR

Rev

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

Rev 2669 Rev 2670
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2669 2018-12-08 17:30:01Z tom.houdayer $
2
#  $Id: alcasar.sh 2670 2018-12-09 11:10:04Z tom.houdayer $
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
5
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
#  team@alcasar.net
7
#  team@alcasar.net
Line 338... Line 338...
338
		exit 1
338
		exit 1
339
	fi
339
	fi
340
	echo -n "."
340
	echo -n "."
341
# Test EXTIF config files
341
# Test EXTIF config files
342
	PUBLIC_IP=`/usr/sbin/ip addr show $EXTIF | grep '^\s*inet\s' | awk '{ print $2 }' | cut -d'/' -f1`
342
	PUBLIC_IP=`/usr/sbin/ip addr show $EXTIF | grep '^\s*inet\s' | awk '{ print $2 }' | cut -d'/' -f1`
343
	PUBLIC_GATEWAY=`/usr/sbin/ip route list | awk '/^default / {print $3}'`
343
	PUBLIC_GATEWAY=`/usr/sbin/ip route list | awk "(/^default / && \$5 == \"$EXTIF\") {print \$3}"`
344
	if [ `echo $PUBLIC_IP|wc -c` -lt 7 ] || [ `echo $PUBLIC_GATEWAY|wc -c` -lt 7 ]
344
	if [ `echo $PUBLIC_IP|wc -c` -lt 7 ] || [ `echo $PUBLIC_GATEWAY|wc -c` -lt 7 ]
345
	then
345
	then
346
		if [ $Lang == "fr" ]
346
		if [ $Lang == "fr" ]
347
		then
347
		then
348
			echo -e "\nÉchec"
348
			echo -e "\nÉchec"