Debian : Managed /etc/ldapsaisie/local transition

This commit is contained in:
Benjamin Renard 2013-06-28 12:08:02 +02:00
parent 67884e7e29
commit be97cd7d53
3 changed files with 19 additions and 1 deletions

View file

@ -2,3 +2,14 @@
chown www-data:adm /var/tmp/ldapsaisie /var/log/ldapsaisie chown www-data:adm /var/tmp/ldapsaisie /var/log/ldapsaisie
chmod 750 /var/tmp/ldapsaisie /var/log/ldapsaisie chmod 750 /var/tmp/ldapsaisie /var/log/ldapsaisie
if test ! -L /etc/ldapsaisie/local
then
echo "Install /etc/ldapsaisie/local symbolic link"
[ -e /etc/ldapsaisie/local ] && mv -f /etc/ldapsaisie/local /etc/ldapsaisie/local.dpkg-old
ln -s /usr/local/share/ldapsaisie /etc/ldapsaisie/local
fi
if [ -f /usr/local/share/ldapsaisie/conf/config.inc.php.dpkg-move ]
then
mv /usr/local/share/ldapsaisie/conf/config.inc.php.dpkg-move /usr/local/share/ldapsaisie/conf/config.inc.php
fi

8
debian/ldapsaisie.preinst vendored Normal file
View file

@ -0,0 +1,8 @@
#!/bin/sh
if test ! -L /etc/ldapsaisie/local
then
echo "Move /etc/ldapsaisie/local in /usr/local/share/ldapsaisie"
mv /etc/ldapsaisie/local /usr/local/share/ldapsaisie
mv /usr/local/share/ldapsaisie/conf/config.inc.php /usr/local/share/ldapsaisie/conf/config.inc.php.dpkg-move
fi

1
debian/rules vendored
View file

@ -29,7 +29,6 @@ install: build
find $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie -name .placefolder -exec rm -f {} \; find $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie -name .placefolder -exec rm -f {} \;
mv $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie/local $(CURDIR)/debian/ldapsaisie/usr/local/share/ldapsaisie mv $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie/local $(CURDIR)/debian/ldapsaisie/usr/local/share/ldapsaisie
dh_link /usr/local/share/ldapsaisie /etc/ldapsaisie/local
find $(CURDIR)/debian/ldapsaisie/usr/local/share/ldapsaisie -type f -exec rm -f \{\} \; find $(CURDIR)/debian/ldapsaisie/usr/local/share/ldapsaisie -type f -exec rm -f \{\} \;
dh_link /usr/local/share/ldapsaisie /usr/share/ldapsaisie/local dh_link /usr/local/share/ldapsaisie /usr/share/ldapsaisie/local
mv $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie/conf/config.inc.php $(CURDIR)/debian/ldapsaisie/usr/local/share/ldapsaisie/conf/ mv $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie/conf/config.inc.php $(CURDIR)/debian/ldapsaisie/usr/local/share/ldapsaisie/conf/