for creole's zephir2 branch
This commit is contained in:
9
upgrade/post_upgrade/00-common
Executable file
9
upgrade/post_upgrade/00-common
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
#suppression des fichiers du type : /usr/share/eole/mysql_pwd.pyc
|
||||
find /usr/share/eole -name "*.pyc" -delete
|
||||
|
||||
#suppression du lien symbolique ajouté pour Upgrade-Auto 2.4
|
||||
[ -L /usr/bin/Upgrade-Auto ] && rm -f /usr/bin/Upgrade-Auto
|
||||
|
||||
exit 0
|
29
upgrade/post_upgrade/01-amon
Executable file
29
upgrade/post_upgrade/01-amon
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
initfile="$(CreoleGet container_path_proxy '')/etc/init.d/winbind"
|
||||
# Utilisation du script d'init fourni par le paquet (#14608)
|
||||
if [ -f ${initfile}.dpkg-dist ];then
|
||||
mv -f ${initfile}.dpkg-dist ${initfile}
|
||||
fi
|
||||
|
||||
# Restauration des bases de filtres obligatoires (#8621)
|
||||
DB="$(CreoleGet container_path_proxy '')/var/lib/blacklists/db"
|
||||
if [ -d /tmp/db ];then
|
||||
for filter in 'adult' 'redirector';do
|
||||
mkdir -p $DB/$filter
|
||||
if [ -f /tmp/db/$filter/urls ];then
|
||||
cp -f /tmp/db/$filter/urls $DB/$filter/urls
|
||||
fi
|
||||
if [ -f /tmp/db/$filter/domains ];then
|
||||
cp -f /tmp/db/$filter/domains $DB/$filter/domains
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Suppression des restrictions pour squid (#15760)
|
||||
[ -f /etc/apparmor.d/usr.sbin.squid ] && ln -nsf /etc/apparmor.d/usr.sbin.squid /etc/apparmor.d/disable/
|
||||
|
||||
# Suppression des configurations fournies par le paquet freeradius (#16147)
|
||||
rm -f /etc/freeradius/modules/*.dpkg-dist
|
||||
|
||||
exit 0
|
6
upgrade/post_upgrade/01-bacula
Executable file
6
upgrade/post_upgrade/01-bacula
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Purge des paquets bacula (#14933)
|
||||
if [ -n "$(dpkg -l eole-bacula | grep ^rc)" ];then
|
||||
apt-get remove --purge -y --force-yes bacula-common bacula-common-sqlite3 bacula-console bacula-director-common bacula-director-sqlite3 bacula-fd bacula-sd eole-bacula
|
||||
fi
|
9
upgrade/post_upgrade/01-horus
Executable file
9
upgrade/post_upgrade/01-horus
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Restauration des fichiers Interbase (#11070)
|
||||
if [ -d /tmp/interbase ];then
|
||||
cp -f /tmp/interbase/isc4.gdb /opt/interbase/isc4.gdb
|
||||
cp -f /tmp/interbase/ib_license.dat /opt/interbase/ib_license.dat 2>/dev/null
|
||||
fi
|
||||
|
||||
exit 0
|
19
upgrade/post_upgrade/03-zephir-client
Executable file
19
upgrade/post_upgrade/03-zephir-client
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
BACKUP_DIR=/var/lib/zephir_backup
|
||||
OLD_DIR=/usr/lib/python2.6/dist-packages/zephir
|
||||
|
||||
if [ -f $BACKUP_DIR/zephir_conf.py ]
|
||||
then
|
||||
# mise en place de la configuration uucp
|
||||
cp -rpf $BACKUP_DIR/.ssh /var/spool/uucp/
|
||||
cp -pf $BACKUP_DIR/uucp/* /etc/uucp/
|
||||
# mise en place de la configuration d'enregistrement (python 2.7)
|
||||
mv -f $BACKUP_DIR/zephir_conf.py /usr/lib/python2.7/dist-packages/zephir/zephir_conf/
|
||||
rm -rf $BACKUP_DIR
|
||||
# suppression anciens fichier python2.6
|
||||
if [ -d $OLD_DIR ]
|
||||
then
|
||||
rm -rf $OLD_DIR
|
||||
fi
|
||||
fi
|
13
upgrade/post_upgrade/10-apache
Executable file
13
upgrade/post_upgrade/10-apache
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
PACKAGES="apache2-mpm-prefork apache2-utils apache2.2-bin"
|
||||
MODULES="alias auth_basic authn_file authz_host authz_user autoindex deflate dir env negotiation status"
|
||||
|
||||
if CreoleGet container_ip_reseau > /dev/null 2>&1
|
||||
then
|
||||
# Remove unwanted packages
|
||||
CreoleRun "apt-eole remove ${PACKAGES}" reseau
|
||||
|
||||
# Enable required modules
|
||||
CreoleRun "a2enmod ${MODULES}" reseau
|
||||
fi
|
4
upgrade/post_upgrade/90-delete-iso
Executable file
4
upgrade/post_upgrade/90-delete-iso
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Remove ISO directory /var/lib/eole/iso"
|
||||
rm -rf /var/lib/eole/iso
|
16
upgrade/post_upgrade/99-grub
Executable file
16
upgrade/post_upgrade/99-grub
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
bootdevice=$(mount | awk '/ \/boot / {gsub(/[0-9]/,"",$1);print $1}')
|
||||
rootdevice=$(mount | awk '/ \/ / {gsub(/[0-9]/,"",$1);print $1}')
|
||||
if [[ -n "${bootdevice}" ]]
|
||||
then
|
||||
grub-install ${bootdevice}
|
||||
exit $?
|
||||
elif [[ -n "${rootdevice}" ]]
|
||||
then
|
||||
grub-install ${rootdevice}
|
||||
exit $?
|
||||
else
|
||||
echo "Le disque d'installation de grub ne peut pas être déterminé."
|
||||
exit 127
|
||||
fi
|
8
upgrade/post_upgrade/99-unlock
Executable file
8
upgrade/post_upgrade/99-unlock
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
python -c 'from pyeole.lock import release; release("upgrade-auto", force=True, level="system")'
|
||||
|
||||
# Unlock instance
|
||||
echo '2.4.2' >| /etc/eole/.upgrade-auto
|
||||
|
||||
exit 0
|
5
upgrade/post_upgrade/99-upgrade_eole
Executable file
5
upgrade/post_upgrade/99-upgrade_eole
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
[[ -f /etc/apt/apt.conf.d/99upgradeEOLE ]] && rm -f /etc/apt/apt.conf.d/99upgradeEOLE
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user