Subversion Repositories ALCASAR

Rev

Rev 3258 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log

Rev 3258 Rev 3261
1
#!/bin/bash
1
#!/bin/bash
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 + 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="9"
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-6.6.79-1.mga9"
15
KERNEL="kernel-server-6.6.79-1.mga9"
16
# ****** Alcasar need RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
16
# ****** Alcasar need RPMS - paquetages nécessaires au fonctionnement d'Alcasar ******
17
# "fonts-dejavu-common" & "fonts-ttf-dejavu" : fonts needed by wkhtmltopdf
17
# "fonts-dejavu-common" & "fonts-ttf-dejavu" : fonts needed by wkhtmltopdf
18
# "lsscsi" & nvme-cli" & "php-dom" : need by phpsysinfo
18
# "lsscsi" & nvme-cli" & "php-dom" : need by phpsysinfo
19
# "php-rrd" : need by nfsen-ng
19
# "php-rrd" : need by nfsen-ng
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" : need after a reinstallation (to be investigated)
21
# "sudo" : need 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
# "nmap" : "/usr/share/nmap/nmap-mac-prefixes" is used to display MAC manufacturers in ACC
23
# "nmap" : "/usr/share/nmap/nmap-mac-prefixes" is used to display MAC manufacturers in ACC
24
 
24
 
25
PACKAGES="vim-enhanced freeradius freeradius-mysql freeradius-ldap apache apache-mod_ssl apache-mod_php php-gd php-ldap php-mysqli php-mbstring php-sockets php-curl php-pdo_sqlite php-cli php-dom php-filter php-intl php-rrd 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"
25
PACKAGES="vim-enhanced freeradius freeradius-mysql freeradius-ldap apache apache-mod_ssl apache-mod_php php-gd php-ldap php-mysqli php-mbstring php-sockets php-curl php-pdo_sqlite php-dom php-filter php-intl php-rrd 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"
26
 
26
 
27
rpm_repository_sync ()
27
rpm_repository_sync ()
28
{
28
{
29
	cat <<EOF > /etc/urpmi/urpmi.cfg
29
	cat <<EOF > /etc/urpmi/urpmi.cfg
30
{
30
{
31
downloader: wget
31
downloader: wget
32
}
32
}
33
EOF
33
EOF
34
	echo ${!MIRRORLIST}
34
	echo ${!MIRRORLIST}
35
	urpmi.addmedia core --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/core/release
35
	urpmi.addmedia core --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/core/release
36
	urpmi.addmedia core-updates --update --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/core/updates
36
	urpmi.addmedia core-updates --update --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/core/updates
37
	urpmi.addmedia nonfree --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/nonfree/release
37
	urpmi.addmedia nonfree --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/nonfree/release
38
	urpmi.addmedia nonfree-updates --update --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/nonfree/updates
38
	urpmi.addmedia nonfree-updates --update --probe-synthesis --mirrorlist ${!MIRRORLIST} /media/nonfree/updates
39
}
39
}
40
 
40
 
41
rpm_error ()
41
rpm_error ()
42
{
42
{
43
	# restore previous rpm conf file & removed RPMs
43
	# restore previous rpm conf file & removed RPMs
44
	[ -e /etc/urpmi/urpmi.cfg.old ] && mv /etc/urpmi/urpmi.cfg.old /etc/urpmi/urpmi.cfg
44
	[ -e /etc/urpmi/urpmi.cfg.old ] && mv /etc/urpmi/urpmi.cfg.old /etc/urpmi/urpmi.cfg
45
	urpmi --no-verify-rpm --auto rpms/$ARCH/wkhtmltopdf*.rpm
45
	urpmi --no-verify-rpm --auto rpms/$ARCH/wkhtmltopdf*.rpm
46
	echo
46
	echo
47
	if [ $Lang == "fr" ]
47
	if [ $Lang == "fr" ]
48
	then
48
	then
49
		echo "Relancez l'installation ultérieurement."
49
		echo "Relancez l'installation ultérieurement."
50
		echo "Si vous rencontrez à nouveau ce problème, modifier les variables MIRRORLIST[1&2] du fichier 'scripts/alcasar-rpm.sh'"
50
		echo "Si vous rencontrez à nouveau ce problème, modifier les variables MIRRORLIST[1&2] du fichier 'scripts/alcasar-rpm.sh'"
51
	else
51
	else
52
		echo "Try an other install later."
52
		echo "Try an other install later."
53
		echo "If this problem occurs again, change the MIRRORLIST[1&2] variables in the file 'scripts/alcasar-rpm.sh'"
53
		echo "If this problem occurs again, change the MIRRORLIST[1&2] variables in the file 'scripts/alcasar-rpm.sh'"
54
	fi
54
	fi
55
}
55
}
56
 
56
 
57
# We prefer wget than curl
57
# We prefer wget than curl
58
wget_exist=`rpm -qa|grep wget|wc -l`
58
wget_exist=`rpm -qa|grep wget|wc -l`
59
if [ "$wget_exist" -eq "0" ]
59
if [ "$wget_exist" -eq "0" ]
60
then
60
then
61
	urpmi --no-verify-rpm --auto rpms/$ARCH/wget*.rpm && rm -f rpms/$ARCH/wget*.rpm
61
	urpmi --no-verify-rpm --auto rpms/$ARCH/wget*.rpm && rm -f rpms/$ARCH/wget*.rpm
62
else
62
else
63
	rm -f rpms/$ARCH/wget*.rpm
63
	rm -f rpms/$ARCH/wget*.rpm
64
fi
64
fi
65
# Set the RPM repository (if not already set)
65
# Set the RPM repository (if not already set)
66
cp /etc/urpmi/urpmi.cfg /etc/urpmi/urpmi.cfg.old
66
cp /etc/urpmi/urpmi.cfg /etc/urpmi/urpmi.cfg.old
67
ACTIVE_REPO=`cat /etc/urpmi/urpmi.cfg|grep "mageia.org"|wc -l`
67
ACTIVE_REPO=`cat /etc/urpmi/urpmi.cfg|grep "mageia.org"|wc -l`
68
MIRROR_NBR=3
68
MIRROR_NBR=3
69
#                       For French
69
#                       For French
70
MIRRORLIST1="http://ftp.free.fr/mirrors/mageia.org/distrib/$VERSION/$ARCH"
70
MIRRORLIST1="http://ftp.free.fr/mirrors/mageia.org/distrib/$VERSION/$ARCH"
71
#                       For Europeans
71
#                       For Europeans
72
MIRRORLIST2="https://www.mirrorservice.org/pub/mageia/distrib/$VERSION/$ARCH"
72
MIRRORLIST2="https://www.mirrorservice.org/pub/mageia/distrib/$VERSION/$ARCH"
73
#                       For everybody
73
#                       For everybody
74
MIRRORLIST3="https://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
74
MIRRORLIST3="https://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
75
try_nb="0"; nb_repository="0"
75
try_nb="0"; nb_repository="0"
76
while [ "$nb_repository" != "4" ]
76
while [ "$nb_repository" != "4" ]
77
do
77
do
78
	try_nb=`expr $try_nb + 1`
78
	try_nb=`expr $try_nb + 1`
79
	MIRRORLIST="MIRRORLIST$try_nb"
79
	MIRRORLIST="MIRRORLIST$try_nb"
80
	rpm_repository_sync
80
	rpm_repository_sync
81
	nb_repository=`cat /etc/urpmi/urpmi.cfg|grep mirrorlist|wc -l`
81
	nb_repository=`cat /etc/urpmi/urpmi.cfg|grep mirrorlist|wc -l`
82
	if [ "$nb_repository" != "4" ]
82
	if [ "$nb_repository" != "4" ]
83
	then
83
	then
84
		if [ $Lang == "fr" ]
84
		if [ $Lang == "fr" ]
85
		then
85
		then
86
			echo "Une erreur a été détectée lors de la synchronisation avec le dépot N°$try_nb."
86
			echo "Une erreur a été détectée lors de la synchronisation avec le dépot N°$try_nb."
87
		else
87
		else
88
			echo "An error occurs when synchronising the repositories N°$try_nb"
88
			echo "An error occurs when synchronising the repositories N°$try_nb"
89
		fi
89
		fi
90
		if [ $(expr $try_nb) -eq $MIRROR_NBR ]
90
		if [ $(expr $try_nb) -eq $MIRROR_NBR ]
91
		then
91
		then
92
			rpm_error
92
			rpm_error
93
			exit 1
93
			exit 1
94
		fi
94
		fi
95
		if [ $Lang == "fr" ]
95
		if [ $Lang == "fr" ]
96
		then
96
		then
97
			echo "Voulez-vous tenter une synchronisation avec un autre dépôt ? (O/n)"
97
			echo "Voulez-vous tenter une synchronisation avec un autre dépôt ? (O/n)"
98
		else
98
		else
99
			echo "Do you want to try a synchronisation with an other repository? (Y/n)"
99
			echo "Do you want to try a synchronisation with an other repository? (Y/n)"
100
		fi
100
		fi
101
		response=0
101
		response=0
102
		PTN='^[oOnNyY]?$'
102
		PTN='^[oOnNyY]?$'
103
		until [[ "$response" =~ $PTN ]]
103
		until [[ "$response" =~ $PTN ]]
104
		do
104
		do
105
			read response
105
			read response
106
		done
106
		done
107
		if [ "$response" = "n" ] || [ "$response" = "N" ]
107
		if [ "$response" = "n" ] || [ "$response" = "N" ]
108
		then
108
		then
109
			[ -e /etc/urpmi/urpmi.cfg.old ] && mv /etc/urpmi/urpmi.cfg.old /etc/urpmi/urpmi.cfg # restore previous rpm conf file
109
			[ -e /etc/urpmi/urpmi.cfg.old ] && mv /etc/urpmi/urpmi.cfg.old /etc/urpmi/urpmi.cfg # restore previous rpm conf file
110
			exit 1
110
			exit 1
111
		fi
111
		fi
112
	fi
112
	fi
113
done
113
done
114
 
114
 
115
# Clean the RPM cache
115
# Clean the RPM cache
116
urpmi --clean
116
urpmi --clean
117
 
117
 
118
# At this time, we only skip Kernel update
118
# At this time, we only skip Kernel update
119
echo "/^kernel/" > /etc/urpmi/skip.list
119
echo "/^kernel/" > /etc/urpmi/skip.list
120
if [ `grep -E '^exclude=' /etc/dnf/dnf.conf |wc -l` -eq "1" ]; then
120
if [ `grep -E '^exclude=' /etc/dnf/dnf.conf |wc -l` -eq "1" ]; then
121
	$SED "s?^exclude=.*?exclude=kernel\*?g" /etc/dnf/dnf.conf
121
	$SED "s?^exclude=.*?exclude=kernel\*?g" /etc/dnf/dnf.conf
122
else
122
else
123
	echo "exclude=kernel*" >> /etc/dnf/dnf.conf
123
	echo "exclude=kernel*" >> /etc/dnf/dnf.conf
124
fi
124
fi
125
 
125
 
126
# download the kernel used by ALCASAR
126
# download the kernel used by ALCASAR
127
if [ $Lang == "fr" ]
127
if [ $Lang == "fr" ]
128
then
128
then
129
	echo "Récupération du noyau Linux exploité par ALCASAR. Veuillez patienter ..."
129
	echo "Récupération du noyau Linux exploité par ALCASAR. Veuillez patienter ..."
130
else
130
else
131
	echo "Download the Linux kernel used by ALCASAR. Please wait ..."
131
	echo "Download the Linux kernel used by ALCASAR. Please wait ..."
132
fi
132
fi
133
urpmi --auto --quiet $KERNEL
133
urpmi --auto --quiet $KERNEL
134
 
134
 
135
# download updated RPM in cache
135
# download updated RPM in cache
136
if [ $Lang == "fr" ]
136
if [ $Lang == "fr" ]
137
then
137
then
138
	echo "Récupération des paquetages de mise à jour. Veuillez patienter ..."
138
	echo "Récupération des paquetages de mise à jour. Veuillez patienter ..."
139
	echo "Il est temps d'aller prendre un café (ou une bonne bière) ;-)"
139
	echo "Il est temps d'aller prendre un café (ou une bonne bière) ;-)"
140
else
140
else
141
	echo "Updated RPM download. Please wait ..."
141
	echo "Updated RPM download. Please wait ..."
142
	echo "You should now take a coffe (or a good beer) ;-)"
142
	echo "You should now take a coffe (or a good beer) ;-)"
143
fi
143
fi
144
urpmi --auto --auto-update --quiet --test --retry 2
144
urpmi --auto --auto-update --quiet --test --retry 2
145
if [ "$?" != "0" ]
145
if [ "$?" != "0" ]
146
then
146
then
147
	echo
147
	echo
148
	if [ $Lang == "fr" ]
148
	if [ $Lang == "fr" ]
149
	then
149
	then
150
		echo "Une erreur a été détectée lors de la récupération des paquetages."
150
		echo "Une erreur a été détectée lors de la récupération des paquetages."
151
	else
151
	else
152
		echo "An error occurs when downloading RPMS"
152
		echo "An error occurs when downloading RPMS"
153
	fi
153
	fi
154
	rpm_error
154
	rpm_error
155
	exit 1
155
	exit 1
156
fi
156
fi
157
 
157
 
158
# update with cached RPM
158
# update with cached RPM
159
urpmi --auto --auto-update
159
urpmi --auto --auto-update
160
if [ "$?" != "0" ]
160
if [ "$?" != "0" ]
161
then
161
then
162
	echo
162
	echo
163
	if [ $Lang == "fr" ]
163
	if [ $Lang == "fr" ]
164
	then
164
	then
165
		echo "Une erreur a été détectée lors de la mise à jour des paquetages."
165
		echo "Une erreur a été détectée lors de la mise à jour des paquetages."
166
	else
166
	else
167
		echo "An error occurs when updating packages"
167
		echo "An error occurs when updating packages"
168
	fi
168
	fi
169
	rpm_error
169
	rpm_error
170
	exit 1
170
	exit 1
171
fi
171
fi
172
 
172
 
173
# Download of ALCASAR specifics RPM in cache (and test)
173
# Download of ALCASAR specifics RPM in cache (and test)
174
if [ $Lang == "fr" ]
174
if [ $Lang == "fr" ]
175
then
175
then
176
	echo "Récupération des paquetages complémentaires. Veuillez patienter ..."
176
	echo "Récupération des paquetages complémentaires. Veuillez patienter ..."
177
else
177
else
178
	echo "Download of complementary packages. Please wait ..."
178
	echo "Download of complementary packages. Please wait ..."
179
fi
179
fi
180
urpmi --auto --no-recommends $PACKAGES --quiet --test --retry 2
180
urpmi --auto --no-recommends $PACKAGES --quiet --test --retry 2
181
if [ "$?" != "0" ]
181
if [ "$?" != "0" ]
182
then
182
then
183
	echo
183
	echo
184
	if [ $Lang == "fr" ]
184
	if [ $Lang == "fr" ]
185
	then
185
	then
186
		echo "Une erreur a été détectée lors de la récupération des paquetages complémentaires."
186
		echo "Une erreur a été détectée lors de la récupération des paquetages complémentaires."
187
	else
187
	else
188
		echo "An error occurs when downloading complementary packages"
188
		echo "An error occurs when downloading complementary packages"
189
	fi
189
	fi
190
	rpm_error
190
	rpm_error
191
	exit 1
191
	exit 1
192
fi
192
fi
193
 
193
 
194
# update with cached RPM
194
# update with cached RPM
195
urpmi --auto --no-recommends $PACKAGES
195
urpmi --auto --no-recommends $PACKAGES
196
if [ "$?" != "0" ]
196
if [ "$?" != "0" ]
197
then
197
then
198
	echo
198
	echo
199
	if [ $Lang == "fr" ]
199
	if [ $Lang == "fr" ]
200
	then
200
	then
201
		echo "Une erreur a été détectée lors de l'installation des paquetages complémentaires."
201
		echo "Une erreur a été détectée lors de l'installation des paquetages complémentaires."
202
	else
202
	else
203
		echo "An error occurs when installing complementary packages"
203
		echo "An error occurs when installing complementary packages"
204
	fi
204
	fi
205
	rpm_error
205
	rpm_error
206
	exit 1
206
	exit 1
207
fi
207
fi
208
 
208
 
209
# Keep only the kernel version we compil netflow with, and remove all others
209
# Keep only the kernel version we compil netflow with, and remove all others
210
kernelVersion=$(rpm -qa | grep -e ^kernel-server -e ^kernel-desktop)
210
kernelVersion=$(rpm -qa | grep -e ^kernel-server -e ^kernel-desktop)
211
for i in $kernelVersion
211
for i in $kernelVersion
212
do
212
do
213
	if [ $i != $KERNEL ];then
213
	if [ $i != $KERNEL ];then
214
		urpme --auto $i
214
		urpme --auto $i
215
	fi
215
	fi
216
done
216
done
217
 
217
 
218
# delete unused or not usefull RPMs
218
# delete unused or not usefull RPMs
219
if [ $Lang == "fr" ]
219
if [ $Lang == "fr" ]
220
then
220
then
221
	echo "Cleaning the system : "
221
	echo "Cleaning the system : "
222
else
222
else
223
	echo "Nettoyage du système : "
223
	echo "Nettoyage du système : "
224
fi
224
fi
225
unused_rpm="shorewall mandi plymouth squid polkit pm-utils dnsmasq clamav clamd clamav-db tracker lighttpd php-fpm"
225
unused_rpm="shorewall mandi plymouth squid polkit pm-utils dnsmasq clamav clamd clamav-db tracker lighttpd php-fpm"
226
/usr/sbin/urpme --auto -a $unused_rpm
226
/usr/sbin/urpme --auto -a $unused_rpm
227
for distrib in mga7 mga8
227
for distrib in mga7 mga8
228
do
228
do
229
	for rpm in `rpm -qa|grep $distrib`; do urpme --auto $rpm; done
229
	for rpm in `rpm -qa|grep $distrib`; do urpme --auto $rpm; done
230
done
230
done
231
/usr/sbin/urpme --auto --auto-orphans
231
/usr/sbin/urpme --auto --auto-orphans
232
 
232
 
233
# Save chilli launch script (erase with new rpm one)
233
# Save chilli launch script (erase with new rpm one)
234
[ -e /etc/chilli.conf ] && cp /etc/chilli.conf /tmp/
234
[ -e /etc/chilli.conf ] && cp /etc/chilli.conf /tmp/
235
# Install home made RPMs
235
# Install home made RPMs
236
for pkg in `ls rpms/$ARCH/*.rpm|grep -v wget`
236
for pkg in `ls rpms/$ARCH/*.rpm|grep -v wget`
237
do
237
do
238
    urpmi --no-verify --auto $pkg
238
    urpmi --no-verify --auto $pkg
239
done
239
done
240
# restore chilli launch script
240
# restore chilli launch script
241
[ -e /tmp/chilli.conf ] && mv /tmp/chilli.conf /etc/
241
[ -e /tmp/chilli.conf ] && mv /tmp/chilli.conf /etc/
242
 
242
 
243
# Clean the RPM cache
243
# Clean the RPM cache
244
urpmi --clean
244
urpmi --clean
245
# the ipt-netflow RPM add the kernel module ipt_NETFLOW (the modules dependance tree need to be updated). "2>/dev/null" in order not to display a error (the running kernel is not the ALCASAR one during the installation process)
245
# the ipt-netflow RPM add the kernel module ipt_NETFLOW (the modules dependance tree need to be updated). "2>/dev/null" in order not to display a error (the running kernel is not the ALCASAR one during the installation process)
246
/sbin/depmod -a 2>/dev/null
246
/sbin/depmod -a 2>/dev/null
247
# test if all needed rpms are correctly installed
247
# test if all needed rpms are correctly installed
248
count_pkg=0; nb_pkg=0;
248
count_pkg=0; nb_pkg=0;
249
for pkg in $PACKAGES
249
for pkg in $PACKAGES
250
do
250
do
251
	nb_pkg=`expr $nb_pkg + 1`
251
	nb_pkg=`expr $nb_pkg + 1`
252
	if rpm -q --quiet $pkg ; then
252
	if rpm -q --quiet $pkg ; then
253
		count_pkg=`expr $count_pkg + 1`
253
		count_pkg=`expr $count_pkg + 1`
254
	else
254
	else
255
		echo "error installing $pkg"
255
		echo "error installing $pkg"
256
	fi
256
	fi
257
done
257
done
258
if [ $count_pkg -ne $nb_pkg ]
258
if [ $count_pkg -ne $nb_pkg ]
259
then
259
then
260
	exit 1
260
	exit 1
261
fi
261
fi
262
 
262
 
263
# test if all custom rpms are correctly installed
263
# test if all custom rpms are correctly installed
264
count_pkg=0; nb_pkg=0;
264
count_pkg=0; nb_pkg=0;
265
for pkg in `ls rpms/$ARCH/|sed 's/.x86_64.rpm//'`
265
for pkg in `ls rpms/$ARCH/|sed 's/.x86_64.rpm//'`
266
do
266
do
267
	nb_pkg=`expr $nb_pkg + 1`
267
	nb_pkg=`expr $nb_pkg + 1`
268
	if rpm -q --quiet $pkg ; then
268
	if rpm -q --quiet $pkg ; then
269
		count_pkg=`expr $count_pkg + 1`
269
		count_pkg=`expr $count_pkg + 1`
270
	else
270
	else
271
		echo "error installing $pkg"
271
		echo "error installing $pkg"
272
	fi
272
	fi
273
done
273
done
274
if [ $count_pkg -ne $nb_pkg ]
274
if [ $count_pkg -ne $nb_pkg ]
275
then
275
then
276
	exit 1
276
	exit 1
277
fi
277
fi
278
 
278
 
279
# .rpmnew handling (unused with ALCASAR)
279
# .rpmnew handling (unused with ALCASAR)
280
[ -e /etc/shadow.rpmnew ] && rm -f /etc/shadow.rpmnew
280
[ -e /etc/shadow.rpmnew ] && rm -f /etc/shadow.rpmnew
281
[ -e /etc/sysconfig/system.rpmnew ] && rm -f /etc/sysconfig/system.rpmnew
281
[ -e /etc/sysconfig/system.rpmnew ] && rm -f /etc/sysconfig/system.rpmnew
282
[ -e /etc/rpm/macros.rpmnew ] && rm -f /etc/rpm/macros.rpmnew
282
[ -e /etc/rpm/macros.rpmnew ] && rm -f /etc/rpm/macros.rpmnew
283
[ -e /etc/fstab.rpmnew ] && rm -f /etc/fstab.rpmnew
283
[ -e /etc/fstab.rpmnew ] && rm -f /etc/fstab.rpmnew
284
[ -e /etc/shells.rpmnew ] && rm -f /etc/shells.rpmnew
284
[ -e /etc/shells.rpmnew ] && rm -f /etc/shells.rpmnew
285
[ -e /etc/hosts.rpmnew ] && rm -f /etc/hosts.rpmnew
285
[ -e /etc/hosts.rpmnew ] && rm -f /etc/hosts.rpmnew
286
[ -e /etc/systemd/journald.conf.rpmnew ] && rm -f /etc/systemd/journald.conf.rpmnew
286
[ -e /etc/systemd/journald.conf.rpmnew ] && rm -f /etc/systemd/journald.conf.rpmnew
287
[ -e /etc/raddb/certs/dh.rpmnew ] && rm -f /etc/raddb/certs/dh.rpmnew
287
[ -e /etc/raddb/certs/dh.rpmnew ] && rm -f /etc/raddb/certs/dh.rpmnew
288
 
288
 
289
# .rpmnew handling (used with ALCASAR)
289
# .rpmnew handling (used with ALCASAR)
290
[ -e /etc/php.ini.rpmnew ] && mv -f /etc/php.ini.rpmnew /etc/php.ini.default
290
[ -e /etc/php.ini.rpmnew ] && mv -f /etc/php.ini.rpmnew /etc/php.ini.default
291
[ -e /etc/lighttpd/lighttpd.conf.rpmnew ] && mv -f /etc/lighttpd/lighttpd.conf.rpmnew /etc/lighttpd/lighttpd.conf.default
291
[ -e /etc/lighttpd/lighttpd.conf.rpmnew ] && mv -f /etc/lighttpd/lighttpd.conf.rpmnew /etc/lighttpd/lighttpd.conf.default
292
[ -e /etc/lighttpd/modules.conf.rpmnew ] && mv -f /etc/lighttpd/modules.conf.rpmnew /etc/lighttpd/modules.conf.default
292
[ -e /etc/lighttpd/modules.conf.rpmnew ] && mv -f /etc/lighttpd/modules.conf.rpmnew /etc/lighttpd/modules.conf.default
293
[ -e /etc/e2guardian/e2guardian.conf.rpmnew ] && mv -f /etc/e2guardian/e2guardian.conf.rpmnew /etc/e2guardian/e2guardian.conf.default
293
[ -e /etc/e2guardian/e2guardian.conf.rpmnew ] && mv -f /etc/e2guardian/e2guardian.conf.rpmnew /etc/e2guardian/e2guardian.conf.default
294
[ -e /etc/e2guardian/e2guardianf1.conf.rpmnew ] && mv -f /etc/e2guardian/e2guardianf1.conf.rpmnew /etc/e2guardian/e2guardianf1.conf.default
294
[ -e /etc/e2guardian/e2guardianf1.conf.rpmnew ] && mv -f /etc/e2guardian/e2guardianf1.conf.rpmnew /etc/e2guardian/e2guardianf1.conf.default
295
[ -e /etc/e2guardian/lists/urlregexplist.rpmnew ] && mv -f /etc/e2guardian/lists/urlregexplist.rpmnew /etc/e2guardian/lists/urlregexplist.default
295
[ -e /etc/e2guardian/lists/urlregexplist.rpmnew ] && mv -f /etc/e2guardian/lists/urlregexplist.rpmnew /etc/e2guardian/lists/urlregexplist.default
296
[ -e /etc/e2guardian/lists/bannedregexpurllist.rpmnew ] && mv -f /etc/e2guardian/lists/bannedregexpurllist.rpmnew /etc/e2guardian/lists/bannedregexpurllist.default
296
[ -e /etc/e2guardian/lists/bannedregexpurllist.rpmnew ] && mv -f /etc/e2guardian/lists/bannedregexpurllist.rpmnew /etc/e2guardian/lists/bannedregexpurllist.default
297
[ -e /etc/vnstat.conf.rpmnew ] && mv -f /etc/vnstat.conf.rpmnew /etc/vnstat.conf.default
297
[ -e /etc/vnstat.conf.rpmnew ] && mv -f /etc/vnstat.conf.rpmnew /etc/vnstat.conf.default
298
[ -e /etc/fail2ban/jail.conf.rpmnew ] && mv -f /etc/fail2ban/jail.conf.rpmnew /etc/fail2ban/jail.conf.default
298
[ -e /etc/fail2ban/jail.conf.rpmnew ] && mv -f /etc/fail2ban/jail.conf.rpmnew /etc/fail2ban/jail.conf.default
299
[ -e /etc/ssh/sshd_config.rpmnew ] && mv -f /etc/ssh/sshd_config.rpmnew /etc/ssh/sshd_config.default
299
[ -e /etc/ssh/sshd_config.rpmnew ] && mv -f /etc/ssh/sshd_config.rpmnew /etc/ssh/sshd_config.default
300
 
300
 
301
exit 0
301
exit 0
302
 
302