Subversion Repositories ALCASAR

Rev

Rev 2983 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2983 Rev 3285
Line 7... Line 7...
7
# Met à jour la configuration réseau conformément au fichier de configuration (alcasar.conf)
7
# Met à jour la configuration réseau conformément au fichier de configuration (alcasar.conf)
8
# update network configuration according to alcasar.conf
8
# update network configuration according to alcasar.conf
9
 
9
 
10
CONF_FILE="/usr/local/etc/alcasar.conf"
10
CONF_FILE="/usr/local/etc/alcasar.conf"
11
TMP_ip_gw_save="/tmp/ipset_ip_gw_save"
11
TMP_ip_gw_save="/tmp/ipset_ip_gw_save"
-
 
12
DOMAIN=`grep ^DOMAIN= $CONF_FILE|cut -d"=" -f2`
12
EXTIF=`grep ^EXTIF= $CONF_FILE|cut -d"=" -f2`
13
EXTIF=`grep ^EXTIF= $CONF_FILE|cut -d"=" -f2`
13
PUBLIC_IP=`grep ^PUBLIC_IP= $CONF_FILE|cut -d"=" -f2`
14
PUBLIC_IP=`grep ^PUBLIC_IP= $CONF_FILE|cut -d"=" -f2`
14
if [ $PUBLIC_IP != "dhcp" ]; then
15
if [ $PUBLIC_IP != "dhcp" ]; then
15
	GW1=`grep ^GW= $CONF_FILE|cut -d"=" -f2`
16
	GW1=`grep ^GW= $CONF_FILE|cut -d"=" -f2`
16
	MTU=`grep ^PUBLIC_MTU= $CONF_FILE|cut -d"=" -f2`
17
	MTU=`grep ^PUBLIC_MTU= $CONF_FILE|cut -d"=" -f2`
Line 121... Line 122...
121
			fi
122
			fi
122
			${routecmd}	# define the default gateway for outgoing traffic
123
			${routecmd}	# define the default gateway for outgoing traffic
123
			ip route flush cache
124
			ip route flush cache
124
		fi
125
		fi
125
		/usr/local/bin/alcasar-iptables.sh
126
		/usr/local/bin/alcasar-iptables.sh
-
 
127
		# write resolv.conf
-
 
128
		cat <<EOF > /etc/resolv.conf
-
 
129
# Basic resolv.conf : ALCASAR ask its local DNS servers (unbound)
-
 
130
search $DOMAIN
-
 
131
nameserver 127.0.0.1
-
 
132
EOF
126
		exit 0
133
		exit 0
127
		;;
134
		;;
128
	*)
135
	*)
129
		exit 1
136
		exit 1
130
		;;
137
		;;