Subversion Repositories ALCASAR

Rev

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

Rev 434 Rev 440
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#  $Id: alcasar.sh 434 2011-01-09 20:43:02Z richard $ 
2
#  $Id: alcasar.sh 440 2011-01-10 23:16:08Z 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 423... Line 423...
423
IPV6INIT=no
423
IPV6INIT=no
424
IPV6TO4INIT=no
424
IPV6TO4INIT=no
425
ACCOUNTING=no
425
ACCOUNTING=no
426
USERCTL=no
426
USERCTL=no
427
EOF
427
EOF
-
 
428
# Mise à l'heure du serveur
-
 
429
	[ -e /etc/ntp/step-tickers.default ] || cp /etc/ntp/step-tickers /etc/ntp/step-tickers.default
-
 
430
	cat <<EOF > /etc/ntp/step-tickers
-
 
431
server 0.fr.pool.ntp.org	# adapt to your country
-
 
432
server 1.fr.pool.ntp.org
-
 
433
server 2.fr.pool.ntp.org
-
 
434
EOF
428
# Configuration du serveur de temps
435
# Configuration du serveur de temps (sur lui même)
429
	[ -e /etc/ntp.conf.default ] || cp /etc/ntp.conf /etc/ntp.conf.default
436
	[ -e /etc/ntp.conf.default ] || cp /etc/ntp.conf /etc/ntp.conf.default
430
	cat <<EOF > /etc/ntp.conf
437
	cat <<EOF > /etc/ntp.conf
-
 
438
#server 0.fr.pool.ntp.org	# non utile car basé sur l'heure système sauf cas très très particulier
-
 
439
#server 1.fr.pool.ntp.org
-
 
440
#server 2.fr.pool.ntp.org
431
server 127.127.1.0   # local clock
441
server 127.127.1.0   		# local clock
432
fudge 127.127.1.0 stratum 10
442
fudge 127.127.1.0 stratum 10
433
server 0.fr.pool.ntp.org
-
 
434
server 1.fr.pool.ntp.org
-
 
435
server 2.fr.pool.ntp.org
-
 
436
restrict $PRIVATE_NETWORK mask $PRIVATE_MASK nomodify notrap
443
restrict $PRIVATE_NETWORK mask $PRIVATE_MASK nomodify notrap
437
restrict 127.0.0.1
444
restrict 127.0.0.1
438
driftfile /var/lib/ntp/drift
445
driftfile /var/lib/ntp/drift
439
logfile /var/log/ntp.log
446
logfile /var/log/ntp.log
440
EOF
447
EOF
-
 
448
 
441
	chown -R ntp:ntp /var/lib/ntp
449
	chown -R ntp:ntp /var/lib/ntp
442
# Renseignement des fichiers hosts.allow et hosts.deny
450
# Renseignement des fichiers hosts.allow et hosts.deny
443
	[ -e /etc/hosts.allow.default ]  || cp /etc/hosts.allow /etc/hosts.allow.default
451
	[ -e /etc/hosts.allow.default ]  || cp /etc/hosts.allow /etc/hosts.allow.default
444
	cat <<EOF > /etc/hosts.allow
452
	cat <<EOF > /etc/hosts.allow
445
ALL: LOCAL, 127.0.0.1, localhost, $PRIVATE_IP
453
ALL: LOCAL, 127.0.0.1, localhost, $PRIVATE_IP