Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2650 → Rev 2651

/scripts/alcasar-conf.sh
126,21 → 126,6
## From 3.2.0 & 3.2.1 ##
if [ $MAJ_PREVIOUS_VERSION == "3" ] && [ $MIN_PREVIOUS_VERSION == "2" ]
then
## rewrite the file managing domain name resolution (local & remote). Hostnames resolutions are now in /etc/hosts
cat << EOF > $DIR_UPDATE/etc/alcasar-dns-name
# Vous pouvez définir ici votre nom de domain local ('localdomain' par défaut)
# Here you can define your local domain name ('localdomain' by default)
local=/$DOMAIN/
domain=$DOMAIN
 
## Ajouter une ligne pour chaque nom de domaine géré par un autre seveur DNS
## Add one line for each domain name managed by an other DNS server
## server=/<your_domain>/<@IP_domain_server>
## Exemple for an A.D. domain : server=/Your.Domain.AD/110.120.100.100
## Exemple for an other domain : server=/an_other_domain/10.20.30.40
 
## INFO : local hostnames are resolved in /etc/hosts file
EOF
## rewrite /etc/hosts file managing hostname resolution
PRIVATE_IP=`grep ^PRIVATE_IP= $CONF_FILE|cut -d"=" -f2|cut -d"/" -f1`
HOSTNAME=`grep ^HOSTNAME= $CONF_FILE|cut -d"=" -f2`
396,8 → 381,10
$SED "s@^\([#]\?\)dhcp-range=.*@\1dhcp-range=$PRIVATE_SECOND_IP,$PRIVATE_LAST_IP,$PRIVATE_NETMASK,12h@" /etc/dnsmasq.conf
$SED "s@^\([#]\?\)dhcp-option=option:router.*@\1dhcp-option=option:router,$PRIVATE_IP@" /etc/dnsmasq.conf
$SED "s@^\([#]\?\)dhcp-option=option:ntp-server.*@\1dhcp-option=option:ntp-server,$PRIVATE_IP@" /etc/dnsmasq.conf
$SED "s?^local=.*?local=/$DOMAIN/?g" $DIR_ETC/alcasar-dns-name
$SED "s?^domain=.*?domain=$DOMAIN?g" $DIR_ETC/alcasar-dns-name
networkDomain='localdomain'
# networkDomain="$DOMAIN" (/!\ this domain (and its subdomains) will not be resolved by the external DNS servers)
$SED "s?^local=.*?local=/$networkDomain/?g" $DIR_ETC/alcasar-dns-name
$SED "s?^domain=.*?domain=$networkDomain?g" $DIR_ETC/alcasar-dns-name
# tinyproxy
$SED "s?^Listen.*?Listen $PRIVATE_IP?g" /etc/tinyproxy/tinyproxy.conf
# DG + BL