Subversion Repositories ALCASAR

Rev

Rev 2763 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2763 Rev 2768
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-urpmi.sh 2763 2019-11-10 18:26:57Z rexy $
2
# $Id: alcasar-urpmi.sh 2768 2019-11-24 15:19:27Z rexy $
3
 
3
 
4
# alcasar-urpmi.sh
4
# alcasar-urpmi.sh
5
# by 3abtux and Rexy
5
# by 3abtux and Rexy
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 221... Line 221...
221
/usr/sbin/urpme --auto --auto-orphans
221
/usr/sbin/urpme --auto --auto-orphans
222
 
222
 
223
# Save chilli launch script (erase with new rpm one)
223
# Save chilli launch script (erase with new rpm one)
224
[ -e /etc/chilli.conf ] && cp /etc/chilli.conf /tmp/
224
[ -e /etc/chilli.conf ] && cp /etc/chilli.conf /tmp/
225
# Install home made RPMs
225
# Install home made RPMs
-
 
226
for pkg in `ls rpms/$ARCH/*.rpm`
-
 
227
do
226
urpmi --no-verify --auto rpms/$ARCH/*.rpm
228
    urpmi --no-verify --auto $pkg
-
 
229
done
227
# restore chilli launch script
230
# restore chilli launch script
228
[ -e /tmp/chilli.conf ] && mv /tmp/chilli.conf /etc/
231
[ -e /tmp/chilli.conf ] && mv /tmp/chilli.conf /etc/
229
# Clean the RPM cache
232
# Clean the RPM cache
230
urpmi --clean
233
urpmi --clean
231
# the ipt-netflow RPM add the kernel module ipt_NETFLOW (the modules dependance tree need to be updated)
234
# 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)
232
/sbin/depmod -a
235
/sbin/depmod -a 2>/dev/null
233
# test if all needed rpms are correctly installed
236
# test if all needed rpms are correctly installed
234
count_pkg=0; nb_pkg=0;
237
count_pkg=0; nb_pkg=0;
235
for pkg in $PACKAGES
238
for pkg in $PACKAGES
236
do
239
do
237
	nb_pkg=`expr $nb_pkg + 1`
240
	nb_pkg=`expr $nb_pkg + 1`
Line 244... Line 247...
244
if [ $count_pkg -ne $nb_pkg ]
247
if [ $count_pkg -ne $nb_pkg ]
245
then
248
then
246
	exit 1
249
	exit 1
247
fi
250
fi
248
# test if all custom rpms are correctly installed
251
# test if all custom rpms are correctly installed
249
#count_pkg=0; nb_pkg=0;
252
count_pkg=0; nb_pkg=0;
250
#for pkg in `ls rpms/$ARCH/|tr -d .rpm`
253
for pkg in `ls rpms/$ARCH/|sed 's/.x86_64.rpm//'`
251
#do
254
do
252
#	nb_pkg=`expr $nb_pkg + 1`
255
	nb_pkg=`expr $nb_pkg + 1`
253
#	if rpm -q --quiet $pkg ; then
256
	if rpm -q --quiet $pkg ; then
254
#		count_pkg=`expr $count_pkg + 1`
257
		count_pkg=`expr $count_pkg + 1`
255
#	else
258
	else
256
#		echo "error installing $pkg"
259
		echo "error installing $pkg"
257
#	fi
260
	fi
258
#done
261
done
259
#if [ $count_pkg -ne $nb_pkg ]
262
if [ $count_pkg -ne $nb_pkg ]
260
#then
263
then
261
#	exit 1
264
	exit 1
262
#fi
265
fi
263
 
-
 
264
exit 0
266
exit 0