Subversion Repositories ALCASAR

Rev

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

Rev 806 Rev 835
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-urpmi.sh 806 2012-02-05 22:19:41Z richard $
2
# $Id: alcasar-urpmi.sh 835 2012-03-11 22:21:27Z richard $
3
 
3
 
4
# alcasar-urpmi.sh
4
# alcasar-urpmi.sh
5
# by Franck BOUIJOUX and Richard REY
5
# by Franck BOUIJOUX 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 9... Line 9...
9
# configure the RPM repository
9
# configure the RPM repository
10
 
10
 
11
VERSION="2010.2"
11
VERSION="2010.2"
12
ARCH="i586" 
12
ARCH="i586" 
13
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
13
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
14
PACKAGES="freeradius freeradius-mysql freeradius-ldap freeradius-web apache-mpm-prefork apache-mod_ssl apache-mod_php squid dansguardian postfix MySQL logwatch ntp awstats cdrecord buffer vim-enhanced bind-utils wget arpscan ulogd openssh-server php-xml php-ldap pam_ccreds rng-utils lsb-release dnsmasq sudo syslinux cronie-anacron pciutils clamav pm-fallback-policy "
14
PACKAGES="freeradius freeradius-mysql freeradius-ldap freeradius-web apache-mpm-prefork apache-mod_ssl apache-mod_php squid dansguardian postfix MySQL logwatch ntp awstats cdrecord buffer vim-enhanced bind-utils arpscan ulogd openssh-server php-xml php-ldap pam_ccreds rng-utils lsb-release dnsmasq sudo syslinux cronie-anacron pciutils clamav pm-fallback-policy "
15
 
15
 
16
rpm_repository_sync ()
16
rpm_repository_sync ()
17
{
17
{
18
echo ${!MIRRORLIST}
18
cat <<EOF > /etc/urpmi/urpmi.cfg
-
 
19
{
19
urpmi.removemedia -a
20
downloader: wget
-
 
21
}
-
 
22
EOF
20
urpmi.addmedia --wget --probe-synthesis --mirrorlist ${!MIRRORLIST} main /media/main/release
23
urpmi.addmedia --probe-synthesis --mirrorlist ${!MIRRORLIST} main /media/main/release
21
urpmi.addmedia --wget --update --probe-synthesis --mirrorlist ${!MIRRORLIST} main_updates /media/main/updates
24
urpmi.addmedia --update --probe-synthesis --mirrorlist ${!MIRRORLIST} main_updates /media/main/updates
22
urpmi.addmedia --wget --probe-synthesis --mirrorlist ${!MIRRORLIST} contrib /media/contrib/release
25
urpmi.addmedia --probe-synthesis --mirrorlist ${!MIRRORLIST} contrib /media/contrib/release
23
urpmi.addmedia --wget --update --probe-synthesis --mirrorlist ${!MIRRORLIST} contrib_updates /media/contrib/updates
26
urpmi.addmedia --update --probe-synthesis --mirrorlist ${!MIRRORLIST} contrib_updates /media/contrib/updates
24
}
27
}
25
 
28
 
26
rpm_error ()
29
rpm_error ()
27
{
30
{
28
echo
31
echo
Line 105... Line 108...
105
# download RPM in cache 
108
# download RPM in cache 
106
echo "Récupération des paquetages de mise à jour. Veuillez patienter ..."
109
echo "Récupération des paquetages de mise à jour. Veuillez patienter ..."
107
echo "Updated RPM download. Please wait ..."
110
echo "Updated RPM download. Please wait ..."
108
echo "Il est temps d'aller prendre un café :-) "
111
echo "Il est temps d'aller prendre un café :-) "
109
echo "You should now take a Beer ;-) "
112
echo "You should now take a Beer ;-) "
110
urpmi --downloader wget --auto --auto-update --quiet --test --retry 2
113
urpmi --auto --auto-update --quiet --test --retry 2
111
if [ "$?" != "0" ]
114
if [ "$?" != "0" ]
112
then
115
then
113
	echo
116
	echo
114
	echo "Une erreur a été détectée lors de la récupération des paquetages."
117
	echo "Une erreur a été détectée lors de la récupération des paquetages."
115
	echo "An error occurs when downloading RPMS"
118
	echo "An error occurs when downloading RPMS"
Line 129... Line 132...
129
# Clean the RPM cache
132
# Clean the RPM cache
130
urpmi --clean
133
urpmi --clean
131
# Download of ALCASAR specifics RPM in cache (and test)
134
# Download of ALCASAR specifics RPM in cache (and test)
132
echo "Récupération des paquetages complémentaires. Veuillez patienter ..."
135
echo "Récupération des paquetages complémentaires. Veuillez patienter ..."
133
echo "Download of complementary packages. Please wait ..."
136
echo "Download of complementary packages. Please wait ..."
134
urpmi --downloader wget --auto $PACKAGES --quiet --test --retry 2
137
urpmi --auto $PACKAGES --quiet --test --retry 2
135
if [ "$?" != "0" ]
138
if [ "$?" != "0" ]
136
then
139
then
137
	echo
140
	echo
138
	echo "Une erreur a été détectée lors de la récupération des paquetages complémentaires."
141
	echo "Une erreur a été détectée lors de la récupération des paquetages complémentaires."
139
	echo "An error occurs when downloading complementary packages"
142
	echo "An error occurs when downloading complementary packages"