Line 7... |
Line 7... |
7 |
# script de mise en place des dépots RPM + installation des RPM complémentaires
|
7 |
# script de mise en place des dépots RPM + installation des RPM complémentaires
|
8 |
# configure the RPM repository + complementary RPM installation
|
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="8"
|
12 |
VERSION="9"
|
13 |
ARCH="x86_64"
|
13 |
ARCH="x86_64"
|
14 |
# The kernel version we compile netflow for
|
14 |
# The kernel version we compile netflow for
|
15 |
KERNEL="kernel-server-5.15.126-1.mga8-1-1.mga8"
|
15 |
KERNEL="kernel-server-6.6.22-1.mga9"
|
16 |
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
|
16 |
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
|
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" & "php-dom" : needed by phpsysinfo
|
19 |
# "lsscsi" & nvme-cli" & "php-dom" : 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 |
# "postfix" + "cyrus-sasl" + "lib64sasl2-plug-plain" : email registration method
|
22 |
# "postfix" + "cyrus-sasl" + "lib64sasl2-plug-plain" : 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 php-dom php-filter unbound e2guardian postfix mariadb ntp bind-utils openssh-server rng-utils rsync fail2ban gnupg2 ulogd ipset usb_modeswitch vnstat dos2unix p7zip msec kernel-userspace-headers kernel-firmware kernel-firmware-nonfree dhcp-server tcpdump fonts-dejavu-common fonts-ttf-dejavu lsscsi nvme-cli sudo socat postfix cyrus-sasl lib64sasl2-plug-plain iftop"
|
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 php-dom php-filter unbound e2guardian postfix mariadb ntpsec bind-utils openssh-server rng-utils rsync fail2ban gnupg2 ulogd ipset usb_modeswitch vnstat dos2unix p7zip msec kernel-userspace-headers kernel-firmware kernel-firmware-nonfree dhcp-server tcpdump fonts-dejavu-common fonts-ttf-dejavu lsscsi nvme-cli sudo socat postfix cyrus-sasl lib64sasl2-plug-plain iftop"
|
24 |
|
24 |
|
25 |
rpm_repository_sync ()
|
25 |
rpm_repository_sync ()
|
26 |
{
|
26 |
{
|
27 |
cat <<EOF > /etc/urpmi/urpmi.cfg
|
27 |
cat <<EOF > /etc/urpmi/urpmi.cfg
|
28 |
{
|
28 |
{
|
Line 39... |
Line 39... |
39 |
rpm_error ()
|
39 |
rpm_error ()
|
40 |
{
|
40 |
{
|
41 |
# restore previous rpm conf file & removed RPMs
|
41 |
# restore previous rpm conf file & removed RPMs
|
42 |
[ -e /etc/urpmi/urpmi.cfg.old ] && mv /etc/urpmi/urpmi.cfg.old /etc/urpmi/urpmi.cfg
|
42 |
[ -e /etc/urpmi/urpmi.cfg.old ] && mv /etc/urpmi/urpmi.cfg.old /etc/urpmi/urpmi.cfg
|
43 |
urpmi --no-verify-rpm --auto rpms/$ARCH/wkhtmltopdf*.rpm
|
43 |
urpmi --no-verify-rpm --auto rpms/$ARCH/wkhtmltopdf*.rpm
|
44 |
urpmi --auto --quiet freeradius-ldap lighttpd-mod_auth
|
- |
|
45 |
echo
|
44 |
echo
|
46 |
if [ $Lang == "fr" ]
|
45 |
if [ $Lang == "fr" ]
|
47 |
then
|
46 |
then
|
48 |
echo "Relancez l'installation ultérieurement."
|
47 |
echo "Relancez l'installation ultérieurement."
|
49 |
echo "Si vous rencontrez à nouveau ce problème, modifier les variables MIRRORLIST[1&2] du fichier 'scripts/alcasar-rpm.sh'"
|
48 |
echo "Si vous rencontrez à nouveau ce problème, modifier les variables MIRRORLIST[1&2] du fichier 'scripts/alcasar-rpm.sh'"
|
Line 51... |
Line 50... |
51 |
echo "Try an other install later."
|
50 |
echo "Try an other install later."
|
52 |
echo "If this problem occurs again, change the MIRRORLIST[1&2] variables in the file 'scripts/alcasar-rpm.sh'"
|
51 |
echo "If this problem occurs again, change the MIRRORLIST[1&2] variables in the file 'scripts/alcasar-rpm.sh'"
|
53 |
fi
|
52 |
fi
|
54 |
}
|
53 |
}
|
55 |
|
54 |
|
56 |
# extract the current Mageia version and hardware architecture (i586 ou X64)
|
- |
|
57 |
fic=`cat /etc/product.id`
|
- |
|
58 |
old="$IFS"
|
- |
|
59 |
IFS=","
|
- |
|
60 |
set $fic
|
- |
|
61 |
for i in $*
|
- |
|
62 |
do
|
- |
|
63 |
if [ "`echo $i|grep distribution|cut -d'=' -f1`" == "distribution" ]
|
- |
|
64 |
then
|
- |
|
65 |
DISTRIBUTION=`echo $i|cut -d"=" -f2`
|
- |
|
66 |
fi
|
- |
|
67 |
if [ "`echo $i|grep version|cut -d'=' -f1`" == "version" ]
|
- |
|
68 |
then
|
- |
|
69 |
CURRENT_VERSION=`echo $i|cut -d"=" -f2`
|
- |
|
70 |
fi
|
- |
|
71 |
if [ "`echo $i|grep arch|cut -d'=' -f1`" == "arch" ]
|
- |
|
72 |
then
|
- |
|
73 |
ARCH=`echo $i|cut -d"=" -f2`
|
- |
|
74 |
fi
|
- |
|
75 |
done
|
- |
|
76 |
IFS="$old"
|
- |
|
77 |
|
- |
|
78 |
# We prefer wget than curl
|
55 |
# We prefer wget than curl
|
79 |
urpmi --no-verify-rpm --auto rpms/$ARCH/wget*.rpm
|
56 |
urpmi --no-verify-rpm --auto rpms/$ARCH/wget*.rpm
|
80 |
|
57 |
|
81 |
# Set the RPM repository (if not already set)
|
58 |
# Set the RPM repository (if not already set)
|
82 |
cp /etc/urpmi/urpmi.cfg /etc/urpmi/urpmi.cfg.old
|
59 |
cp /etc/urpmi/urpmi.cfg /etc/urpmi/urpmi.cfg.old
|
Line 128... |
Line 105... |
128 |
fi
|
105 |
fi
|
129 |
done
|
106 |
done
|
130 |
|
107 |
|
131 |
# At this time, we only skip Kernel update
|
108 |
# At this time, we only skip Kernel update
|
132 |
echo "/^kernel/" > /etc/urpmi/skip.list
|
109 |
echo "/^kernel/" > /etc/urpmi/skip.list
|
133 |
if [ `egrep '^exclude=' /etc/dnf/dnf.conf |wc -l` -eq "1" ]; then
|
110 |
if [ `grep -E '^exclude=' /etc/dnf/dnf.conf |wc -l` -eq "1" ]; then
|
134 |
$SED "s?^exclude=.*?exclude=kernel\*?g" /etc/dnf/dnf.conf
|
111 |
$SED "s?^exclude=.*?exclude=kernel\*?g" /etc/dnf/dnf.conf
|
135 |
else
|
112 |
else
|
136 |
echo "exclude=kernel*" >> /etc/dnf/dnf.conf
|
113 |
echo "exclude=kernel*" >> /etc/dnf/dnf.conf
|
137 |
fi
|
114 |
fi
|
138 |
|
115 |
|
139 |
# Remove some RPMs in order to avoid error and automatic update
|
- |
|
140 |
urpme wkhtmltopdf freeradius-ldap lighttpd-mod_auth
|
- |
|
141 |
|
- |
|
142 |
# download the kernel used by ALCASAR
|
116 |
# download the kernel used by ALCASAR
|
143 |
if [ $Lang == "fr" ]
|
117 |
if [ $Lang == "fr" ]
|
144 |
then
|
118 |
then
|
145 |
echo "Récupération du noyau Linux exploité par ALCASAR. Veuillez patienter ..."
|
119 |
echo "Récupération du noyau Linux exploité par ALCASAR. Veuillez patienter ..."
|
146 |
else
|
120 |
else
|