Subversion Repositories ALCASAR

Rev

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

Rev 2988 Rev 2990
Line 2... Line 2...
2
 
2
 
3
# alcasar-rpm.sh
3
# alcasar-rpm.sh
4
# by 3abtux and Rexy
4
# by 3abtux and Rexy
5
# This script is distributed under the Gnu General Public License (GPL)
5
# This script is distributed under the Gnu General Public License (GPL)
6
 
6
 
7
# script de mise en place des dépots RPM
7
# script de mise en place des dépots RPM + installation des RPM complémentaires
8
# configure the RPM repository
8
# configure the RPM repository + complementary RPM installation
9
 
9
 
10
Lang=`echo $LANG|cut -c 1-2`
10
Lang=`echo $LANG|cut -c 1-2`
11
SED="/bin/sed -i"
11
SED="/bin/sed -i"
12
VERSION="7"
12
VERSION="7"
13
ARCH="x86_64"
13
ARCH="x86_64"
Line 17... Line 17...
17
# (old) perl-Socket6 : needed by nfsen
17
# (old) perl-Socket6 : needed by nfsen
18
# "fonts-dejavu-common" & "fonts-ttf-dejavu" : fonts needed by wkhtmltopdf
18
# "fonts-dejavu-common" & "fonts-ttf-dejavu" : fonts needed by wkhtmltopdf
19
# "lsscsi" & nvme-cli" : needed by phpsysinfo
19
# "lsscsi" & nvme-cli" : needed by phpsysinfo
20
# "socat" : avoid a warning when run the install script of letsencrypt ("acme.sh")
20
# "socat" : avoid a warning when run the install script of letsencrypt ("acme.sh")
21
# "sudo" : needed after a reinstallation (to be investigated)
21
# "sudo" : needed after a reinstallation (to be investigated)
22
# "clamav + clamav-db" : needed because of a lack of mutual dependance
22
# "clamav" + "clamav-db" : needed because of a lack of mutual dependance
-
 
23
# "postfix" + "cyrus-sasl" : email registration method
23
PACKAGES="vim-enhanced freeradius freeradius-mysql freeradius-ldap lighttpd lighttpd-mod_auth php-fpm php-gd php-ldap php-mysqli php-mbstring php-sockets php-curl php-pdo_sqlite php-cli unbound e2guardian postfix mariadb ntp bind-utils openssh-server rng-utils rsync clamav clamav-db clamd fail2ban gnupg2 ulogd pm-fallback-policy ipset usb_modeswitch vnstat dos2unix p7zip msec kernel-userspace-headers kernel-firmware-nonfree dnsmasq dhcp-server tcpdump fonts-dejavu-common fonts-ttf-dejavu lsscsi nvme-cli sudo socat"
24
PACKAGES="vim-enhanced freeradius freeradius-mysql freeradius-ldap lighttpd lighttpd-mod_auth php-fpm php-gd php-ldap php-mysqli php-mbstring php-sockets php-curl php-pdo_sqlite php-cli unbound e2guardian postfix mariadb ntp bind-utils openssh-server rng-utils rsync clamav clamav-db clamd fail2ban gnupg2 ulogd pm-fallback-policy ipset usb_modeswitch vnstat dos2unix p7zip msec kernel-userspace-headers kernel-firmware-nonfree dnsmasq dhcp-server tcpdump fonts-dejavu-common fonts-ttf-dejavu lsscsi nvme-cli sudo socat postfix cyrus-sasl"
24
 
25
 
25
rpm_repository_sync ()
26
rpm_repository_sync ()
26
{
27
{
27
cat <<EOF > /etc/urpmi/urpmi.cfg
28
cat <<EOF > /etc/urpmi/urpmi.cfg
28
{
29
{
Line 74... Line 75...
74
# We prefer wget than curl
75
# We prefer wget than curl
75
urpmi --no-verify-rpm --auto rpms/$ARCH/wget*.rpm
76
urpmi --no-verify-rpm --auto rpms/$ARCH/wget*.rpm
76
 
77
 
77
# Set the RPM repository (if not already set)
78
# Set the RPM repository (if not already set)
78
ACTIVE_REPO=`cat /etc/urpmi/urpmi.cfg|grep "mageia.org"|wc -l`
79
ACTIVE_REPO=`cat /etc/urpmi/urpmi.cfg|grep "mageia.org"|wc -l`
79
MIRROR_NBR=2
80
MIRROR_NBR=3
-
 
81
#                       For French
-
 
82
MIRRORLIST1="http://ftp.free.fr/mirrors/mageia.org/distrib/$VERSION/$ARCH"
80
#                       For Europeans
83
#                       For Europeans
81
MIRRORLIST1="https://www.mirrorservice.org/pub/mageia/distrib/$VERSION/$ARCH"
84
MIRRORLIST2="https://www.mirrorservice.org/pub/mageia/distrib/$VERSION/$ARCH"
82
#                       For International install
85
#                       For everybody
83
MIRRORLIST2="https://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
86
MIRRORLIST3="https://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
84
try_nb="0"; nb_repository="0"
87
try_nb="0"; nb_repository="0"
85
while [ "$nb_repository" != "4" ]
88
while [ "$nb_repository" != "4" ]
86
do
89
do
87
	try_nb=`expr $try_nb + 1`
90
	try_nb=`expr $try_nb + 1`
88
	MIRRORLIST="MIRRORLIST$try_nb"
91
	MIRRORLIST="MIRRORLIST$try_nb"