Subversion Repositories ALCASAR

Rev

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

Rev 763 Rev 765
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 763 2011-11-01 07:40:04Z franck $ 
2
#  $Id: alcasar.sh 765 2011-11-07 20:14:56Z stephane $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
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
 
7
 
Line 333... Line 333...
333
	DNS1=${DNS1:=208.67.220.220}
333
	DNS1=${DNS1:=208.67.220.220}
334
	DNS2=${DNS2:=208.67.222.222}
334
	DNS2=${DNS2:=208.67.222.222}
335
	PUBLIC_NETMASK=`grep NETMASK /etc/sysconfig/network-scripts/default-ifcfg-$EXTIF|cut -d"=" -f2`
335
	PUBLIC_NETMASK=`grep NETMASK /etc/sysconfig/network-scripts/default-ifcfg-$EXTIF|cut -d"=" -f2`
336
	PUBLIC_PREFIX=`/bin/ipcalc -p $PUBLIC_IP $PUBLIC_NETMASK |cut -d"=" -f2`		# prefixe du réseau (ex. 24)
336
	PUBLIC_PREFIX=`/bin/ipcalc -p $PUBLIC_IP $PUBLIC_NETMASK |cut -d"=" -f2`		# prefixe du réseau (ex. 24)
337
	PUBLIC_GATEWAY=`grep GATEWAY /etc/sysconfig/network-scripts/default-ifcfg-$EXTIF|cut -d"=" -f2`
337
	PUBLIC_GATEWAY=`grep GATEWAY /etc/sysconfig/network-scripts/default-ifcfg-$EXTIF|cut -d"=" -f2`
338
	echo "PUBLIC_IP=$PUBLIC_IP/$PUBLIC_PREFIX" >> $CONF_FILE 
338
	echo "PUBLIC_IP=$PUBLIC_IP/$PUBLIC_PREFIX" >> $CONF_FILE
-
 
339
	echo "PUBLIC_MTU=1500" >> $CONF_FILE
339
	echo "GW=$PUBLIC_GATEWAY" >> $CONF_FILE 
340
	echo "GW=$PUBLIC_GATEWAY" >> $CONF_FILE 
340
	echo "DNS1=$DNS1" >> $CONF_FILE
341
	echo "DNS1=$DNS1" >> $CONF_FILE
341
	echo "DNS2=$DNS2" >> $CONF_FILE
342
	echo "DNS2=$DNS2" >> $CONF_FILE
342
	echo "PRIVATE_IP=$PRIVATE_IP_MASK" >> $CONF_FILE
343
	echo "PRIVATE_IP=$PRIVATE_IP_MASK" >> $CONF_FILE
343
	echo "DHCP=on" >> $CONF_FILE
344
	echo "DHCP=on" >> $CONF_FILE