Subversion Repositories ALCASAR

Rev

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

Rev 1006 Rev 1007
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-urpmi.sh 1006 2013-01-05 12:10:26Z richard $
2
# $Id: alcasar-urpmi.sh 1007 2013-01-05 15:14:32Z richard $
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 9... Line 9...
9
# configure the RPM repository
9
# configure the RPM repository
10
 
10
 
11
VERSION="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 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"
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
{
Line 113... Line 113...
113
		fi
113
		fi
114
	fi
114
	fi
115
done
115
done
116
# delete unused RPMs
116
# delete unused RPMs
117
echo "Cleaning the system : "
117
echo "Cleaning the system : "
118
for rm_rpm in shorewall dhcp-server distcache-server avahi mandi radeontool mondo mindi task-x11 x11-server-common
118
for rm_rpm in shorewall mandi radeontool
119
do
119
do
120
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
120
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
121
	echo -n "."
121
	echo -n "."
122
done
122
done
123
echo
123
echo
Line 168... Line 168...
168
	echo "An error occurs when installing complementary packages"
168
	echo "An error occurs when installing complementary packages"
169
	rpm_error
169
	rpm_error
170
	exit 1
170
	exit 1
171
fi
171
fi
172
# delete old alcasar RPMs and unused services
172
# delete old alcasar RPMs and unused services
173
for rm_rpm in c-icap-server lib64chilli0 libchilli0 python-coova-chilli cyrus-sasl net-snmp
173
for rm_rpm in c-icap-server lib64chilli0 libchilli0 python-coova-chilli cyrus-sasl mageia-gfxboot-theme
174
do
174
do
175
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
175
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
176
done
176
done
177
# Save chilli launch script (erase with new rpm one)
177
# Save chilli launch script (erase with new rpm one)
178
cp /etc/chilli.conf /tmp/
178
[ -e /etc/chilli.conf ] && cp /etc/chilli.conf /tmp/
179
# Install home made RPMs
179
# Install home made RPMs
180
urpmi --no-verify --auto conf/rpms/$ARCH/*.rpm
180
urpmi --no-verify --auto conf/rpms/$ARCH/*.rpm
181
# restore chilli launch script
181
# restore chilli launch script
182
mv -f /tmp/chilli.conf /etc/
182
[ -e /tmp/chilli.conf ] && mv /tmp/chilli.conf /etc/
183
# Don't upgrade coova-chilli and freeradius via repository
-
 
184
for rpmskip in coova-chilli freeradius 
-
 
185
do
-
 
186
	echo -n "/^$rpmskip/" >> /etc/urpmi/skip.list
-
 
187
done
-
 
188
# Clean the RPM cache
183
# Clean the RPM cache
189
urpmi --clean
184
urpmi --clean
190
exit 0
185
exit 0
191
 
186