Subversion Repositories ALCASAR

Rev

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

Rev 75 Rev 80
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#  $Id: alcasar.sh 75 2010-04-15 21:54:46Z richard $ 
2
#  $Id: alcasar.sh 80 2010-04-17 22:54:06Z richard $ 
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 204... Line 204...
204
	done
204
	done
205
	for svc in alsa sound dm atd memcached dc_server
205
	for svc in alsa sound dm atd memcached dc_server
206
	do
206
	do
207
		/sbin/chkconfig --del $svc
207
		/sbin/chkconfig --del $svc
208
	done
208
	done
209
# On installe les mises à jour spécifiques
209
# On installe les RPMs spécifiques à la version
-
 
210
	fic=`cat /etc/product.id`
-
 
211
	old="$IFS"
-
 
212
	IFS=","
-
 
213
	set $fic
-
 
214
	for i in $*
-
 
215
	do
-
 
216
		if [ "`echo $i|grep arch|cut -d'=' -f1`" == "arch" ]
-
 
217
		then 
-
 
218
			ARCH=`echo $i|cut -d"=" -f2`
-
 
219
		fi
-
 
220
	done
-
 
221
	IFS="$old"
210
	urpmi --no-verify --auto $DIR_CONF/rpms-update/*.rpm
222
	urpmi --no-verify --auto $DIR_CONF/rpms/$ARCH/*.rpm
211
# On supprime les paquetages orphelins
223
# On supprime les paquetages orphelins
212
	/usr/sbin/urpme --auto-orphans --auto
224
	/usr/sbin/urpme --auto-orphans --auto
213
# On vide le répertoire temporaire
225
# On vide le répertoire temporaire
214
	urpmi --clean
226
	urpmi --clean
215
# On crée aléatoirement les mots de passe et les secrets partagés
227
# On crée aléatoirement les mots de passe et les secrets partagés
Line 864... Line 876...
864
# la page d'interception est en français
876
# la page d'interception est en français
865
	$SED "s?^language =.*?language = french?g" /etc/dansguardian/dansguardian.conf
877
	$SED "s?^language =.*?language = french?g" /etc/dansguardian/dansguardian.conf
866
# on limite l'écoute de Dansguardian côté LAN
878
# on limite l'écoute de Dansguardian côté LAN
867
	$SED "s?^filterip =.*?filterip = $PRIVATE_IP?g" /etc/dansguardian/dansguardian.conf
879
	$SED "s?^filterip =.*?filterip = $PRIVATE_IP?g" /etc/dansguardian/dansguardian.conf
868
# on chaîne Dansguardian au proxy antivirus HAVP
880
# on chaîne Dansguardian au proxy antivirus HAVP
869
	$SED "s?^proxyport.*?proxyport 8090?g" /etc/dansguardian/dansguardian.conf
881
	$SED "s?^proxyport.*?proxyport = 8090?g" /etc/dansguardian/dansguardian.conf
870
# on remplace la page d'interception (template)
882
# on remplace la page d'interception (template)
871
	cp -f $DIR_CONF/template.html /usr/share/dansguardian/languages/ukenglish/
883
	cp -f $DIR_CONF/template.html /usr/share/dansguardian/languages/ukenglish/
872
	cp -f $DIR_CONF/template-fr.html /usr/share/dansguardian/languages/french/template.html
884
	cp -f $DIR_CONF/template-fr.html /usr/share/dansguardian/languages/french/template.html
873
# on ne loggue que les deny (pour le reste, on a squid)
885
# on ne loggue que les deny (pour le reste, on a squid)
874
	$SED "s?^loglevel =.*?loglevel = 1?g" /etc/dansguardian/dansguardian.conf
886
	$SED "s?^loglevel =.*?loglevel = 1?g" /etc/dansguardian/dansguardian.conf
Line 928... Line 940...
928
# création de la partition de stockage temporaire (100Mo)
940
# création de la partition de stockage temporaire (100Mo)
929
useradd -r havp
941
useradd -r havp
930
dd if=/dev/zero of=/tmp/havp-disk bs=1024k count=30
942
dd if=/dev/zero of=/tmp/havp-disk bs=1024k count=30
931
mkfs.ext4 -qF /tmp/havp-disk
943
mkfs.ext4 -qF /tmp/havp-disk
932
mkdir /var/tmp/havp /var/log/havp /var/run/havp
944
mkdir /var/tmp/havp /var/log/havp /var/run/havp
933
chown havp:havp /var/tmp/havp /var/log/havp /var/run/havp
-
 
934
echo "# Entry for havp tmp files scan partition" >> /etc/fstab
945
echo "# Entry for havp tmp files scan partition" >> /etc/fstab
935
echo "/tmp/havp-disk /var/tmp/havp ext4 loop,mand,noatime,async" >> /etc/fstab
946
echo "/tmp/havp-disk /var/tmp/havp ext4 loop,mand,noatime,async" >> /etc/fstab
-
 
947
mount /var/tmp/havp
936
# copie et configuration d'HAVP
948
# copie et configuration d'HAVP
937
cp $DIR_CONF/havp/havp $DIR_DEST_SBIN
949
cp $DIR_CONF/havp/havp $DIR_DEST_SBIN
938
cp -r $DIR_CONF/havp/etc/havp $DIR_DEST_ETC
950
cp -r $DIR_CONF/havp/etc/havp $DIR_DEST_ETC
939
cp $DIR_CONF/havp/etc/init.d/havp /etc/init.d/
951
cp $DIR_CONF/havp/etc/init.d/havp /etc/init.d/
940
chkconfig --level 345 havp on
952
chkconfig --level 345 havp on
941
chkconfig --level 01267 havp off
953
chkconfig --level 01267 havp off
-
 
954
chown -R havp.havp /var/tmp/havp /var/log/havp /var/run/havp $DIR_DEST_ETC/havp
942
}
955
}
943
 
956
 
944
##################################################################################
957
##################################################################################
945
##				Fonction firewall				##
958
##				Fonction firewall				##
946
## - adaptation des scripts du parefeu						##
959
## - adaptation des scripts du parefeu						##