Subversion Repositories ALCASAR

Rev

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

Rev 905 Rev 914
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 905 2012-06-23 11:50:42Z franck $ 
2
#  $Id: alcasar.sh 914 2012-06-28 16:12:05Z franck $ 
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 362... Line 362...
362
	echo "GW=$PUBLIC_GATEWAY" >> $CONF_FILE 
362
	echo "GW=$PUBLIC_GATEWAY" >> $CONF_FILE 
363
	echo "DNS1=$DNS1" >> $CONF_FILE
363
	echo "DNS1=$DNS1" >> $CONF_FILE
364
	echo "DNS2=$DNS2" >> $CONF_FILE
364
	echo "DNS2=$DNS2" >> $CONF_FILE
365
	echo "PRIVATE_IP=$PRIVATE_IP_MASK" >> $CONF_FILE
365
	echo "PRIVATE_IP=$PRIVATE_IP_MASK" >> $CONF_FILE
366
	echo "DHCP=half" >> $CONF_FILE
366
	echo "DHCP=half" >> $CONF_FILE
-
 
367
	echo "EXT_DHCP_IP=none" >> $CONF_FILE
-
 
368
	echo "RELAY_DHCP_IP=none" >> $CONF_FILE
-
 
369
	echo "RELAY_DHCP_PORT=none" >> $CONF_FILE
367
	[ -e /etc/sysconfig/network.default ] || cp /etc/sysconfig/network /etc/sysconfig/network.default
370
	[ -e /etc/sysconfig/network.default ] || cp /etc/sysconfig/network /etc/sysconfig/network.default
368
# config network
371
# config network
369
	cat <<EOF > /etc/sysconfig/network
372
	cat <<EOF > /etc/sysconfig/network
370
NETWORKING=yes
373
NETWORKING=yes
371
HOSTNAME="$HOSTNAME"
374
HOSTNAME="$HOSTNAME"
Line 373... Line 376...
373
EOF
376
EOF
374
# config /etc/hosts
377
# config /etc/hosts
375
	[ -e /etc/hosts.default ] || cp /etc/hosts /etc/hosts.default
378
	[ -e /etc/hosts.default ] || cp /etc/hosts /etc/hosts.default
376
	cat <<EOF > /etc/hosts
379
	cat <<EOF > /etc/hosts
377
127.0.0.1	localhost
380
127.0.0.1	localhost
378
$PRIVATE_IP	$HOSTNAME 
381
$PRIVATE_IP	$HOSTNAME $HOSTNAME.$DOMAIN
379
EOF
382
EOF
380
# Config eth0 (Internet)
383
# Config eth0 (Internet)
381
	cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$EXTIF
384
	cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$EXTIF
382
DEVICE=$EXTIF
385
DEVICE=$EXTIF
383
BOOTPROTO=static
386
BOOTPROTO=static