Subversion Repositories ALCASAR

Rev

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

Rev 2454 Rev 2457
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2454 2017-12-09 18:59:31Z tom.houdayer $
2
#  $Id: alcasar.sh 2457 2017-12-10 14:11:01Z 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 502... Line 502...
502
	private_broadcast_ending=`echo $PRIVATE_BROADCAST | cut -d"." -f4`				# last octet of LAN broadcast
502
	private_broadcast_ending=`echo $PRIVATE_BROADCAST | cut -d"." -f4`				# last octet of LAN broadcast
503
	PRIVATE_FIRST_IP=`echo $PRIVATE_NETWORK | cut -d"." -f1-3`"."`expr $private_network_ending + 1`	# First network address (ex.: 192.168.182.1)
503
	PRIVATE_FIRST_IP=`echo $PRIVATE_NETWORK | cut -d"." -f1-3`"."`expr $private_network_ending + 1`	# First network address (ex.: 192.168.182.1)
504
	PRIVATE_LAST_IP=`echo $PRIVATE_BROADCAST | cut -d"." -f1-3`"."`expr $private_broadcast_ending - 1`	# last network address (ex.: 192.168.182.254)
504
	PRIVATE_LAST_IP=`echo $PRIVATE_BROADCAST | cut -d"." -f1-3`"."`expr $private_broadcast_ending - 1`	# last network address (ex.: 192.168.182.254)
505
	PRIVATE_MAC=`/usr/sbin/ip link show $INTIF | grep ether | cut -d" " -f6| sed 's/:/-/g'| awk '{print toupper($0)}'` 	# MAC address of INTIF
505
	PRIVATE_MAC=`/usr/sbin/ip link show $INTIF | grep ether | cut -d" " -f6| sed 's/:/-/g'| awk '{print toupper($0)}'` 	# MAC address of INTIF
506
# Define Internet parameters
506
# Define Internet parameters
507
	DNS1=`grep ^nameserver /etc/resolv.conf|awk -F" " '{print $2}'|head -n 1`				# 1st DNS server
507
	DNS1=`grep ^nameserver /etc/resolv.conf|awk -F" " '{print $2}'|head -n 1`	# 1st DNS server
-
 
508
	if [ "$DNS1" != "" ] && [ "$DNS1" != "127.0.0.1" ]
-
 
509
	then
-
 
510
		if [ $Lang == "fr" ]
-
 
511
		then
-
 
512
		       	echo "L'adresse IP des serveurs DNS ne sont pas corrects"
-
 
513
			echo "Vérifiez la configuration de la carte réseau externe ($EXTIF)"
-
 
514
		else
-
 
515
		       	echo "The IP address of DNS servers are not set correctly"
-
 
516
			echo "Check the extern network card configuration ($EXTIF)"
-
 
517
		fi
-
 
518
		exit 0
-
 
519
	fi
508
	nb_dns=`grep -c ^nameserver /etc/resolv.conf`
520
	nb_dns=`grep -c ^nameserver /etc/resolv.conf`
509
	if [ $nb_dns == 2 ]
521
	if [ $nb_dns == 2 ]
510
		then
522
		then
511
		DNS2=`grep ^nameserver /etc/resolv.conf|cut -d" " -f2|tail -n 1`			# 2nd DNS server (if exist)
523
		DNS2=`grep ^nameserver /etc/resolv.conf|cut -d" " -f2|tail -n 1`			# 2nd DNS server (if exist)
512
	fi
524
	fi