Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-rpm-download.sh 958 2012-07-19 09:01:30Z franck $
|
2 |
# $Id: alcasar-rpm-download.sh 1007 2013-01-05 15:14:32Z 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 |
|
8 |
# récupération des RPM nécessaire dans un fichier tarball
|
8 |
# récupération des RPM nécessaire dans un fichier tarball
|
9 |
# retrieve needed RPM in a yarball file
|
9 |
# retrieve needed RPM in a tarball file
|
10 |
|
10 |
|
11 |
VERSION="2010.2"
|
11 |
VERSION="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 buffer vim-enhanced bind-utils arpscan ulogd openssh-server php-xml php-ldap pam_ccreds rng-utils lsb-release dnsmasq sudo syslinux rsync 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 iptables squid dansguardian postfix mariadb logwatch ntp awstats bind-utils openssh-server php-xml php-ldap php-mysql pam_ccreds rng-utils dnsmasq syslinux rsync cronie-anacron clamav pm-fallback-policy"
|
15 |
|
15 |
|
16 |
rpm_repository_sync ()
|
16 |
rpm_repository_sync ()
|
17 |
{
|
17 |
{
|
18 |
cat <<EOF > /etc/urpmi/urpmi.cfg
|
18 |
cat <<EOF > /etc/urpmi/urpmi.cfg
|
19 |
{
|
19 |
{
|
20 |
downloader: wget
|
20 |
downloader: wget
|
21 |
}
|
21 |
}
|
22 |
EOF
|
22 |
EOF
|
23 |
urpmi.addmedia --probe-synthesis --mirrorlist ${!MIRRORLIST} main /media/main/release
|
- |
|
24 |
urpmi.addmedia --update --probe-synthesis --mirrorlist ${!MIRRORLIST} main_updates /media/main/updates
|
- |
|
25 |
urpmi.addmedia --probe-synthesis --mirrorlist ${!MIRRORLIST} contrib /media/contrib/release
|
23 |
urpmi.addmedia --probe-synthesis --mirrorlist ${!MIRRORLIST} core /media/core/release
|
26 |
urpmi.addmedia --update --probe-synthesis --mirrorlist ${!MIRRORLIST} contrib_updates /media/contrib/updates
|
24 |
urpmi.addmedia --update --probe-synthesis --mirrorlist ${!MIRRORLIST} core_updates /media/core/updates
|
27 |
}
|
25 |
}
|
28 |
|
26 |
|
29 |
rpm_error ()
|
27 |
rpm_error ()
|
30 |
{
|
28 |
{
|
31 |
echo
|
29 |
echo
|
Line 51... |
Line 49... |
51 |
# We prefer wget than curl
|
49 |
# We prefer wget than curl
|
52 |
urpmi --no-verify-rpm --auto ../../conf/rpms/$ARCH/wget*.rpm
|
50 |
urpmi --no-verify-rpm --auto ../../conf/rpms/$ARCH/wget*.rpm
|
53 |
# Set the RPM repository
|
51 |
# Set the RPM repository
|
54 |
MIRROR_NBR=2
|
52 |
MIRROR_NBR=2
|
55 |
# For french ALCASARistes
|
53 |
# For french ALCASARistes
|
56 |
MIRRORLIST1="http://ftp.free.fr/pub/Distributions_Linux/MandrivaLinux/official/$VERSION/$ARCH"
|
54 |
MIRRORLIST1="http://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/$VERSION/$ARCH"
|
57 |
# For International install
|
55 |
# For International install
|
58 |
MIRRORLIST2="http://api.mandriva.com/mirrors/basic.$VERSION.$ARCH.list"
|
56 |
MIRRORLIST2="http://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
|
59 |
try_nb="0"; nb_repository="0"
|
57 |
try_nb="0"; nb_repository="0"
|
60 |
while [ "$nb_repository" != "4" ]
|
58 |
while [ "$nb_repository" != "4" ]
|
61 |
do
|
59 |
do
|
62 |
try_nb=`expr $try_nb + 1`
|
60 |
try_nb=`expr $try_nb + 1`
|
63 |
MIRRORLIST="MIRRORLIST$try_nb"
|
61 |
MIRRORLIST="MIRRORLIST$try_nb"
|