From 10b248358d6356f73e146a38398380848ff22932 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 16 Feb 2008 10:04:50 +0000 Subject: [PATCH] new handling of profiles and shells --- lam-packaging/debian/postinst | 21 +++++++++++++++++++++ lam-packaging/debian/rules | 12 ++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/lam-packaging/debian/postinst b/lam-packaging/debian/postinst index 2454b665..490ce7fb 100755 --- a/lam-packaging/debian/postinst +++ b/lam-packaging/debian/postinst @@ -5,6 +5,27 @@ set -e . /usr/share/debconf/confmodule db_version 2.0 || [ $? -lt 30 ] +cd /var/lib/ldap-account-manager/config-samples/profiles +files=`ls -a default.*` +for file in $files; do + if [ ! -f /var/lib/ldap-account-manager/config/profiles/$file ]; then + cp $file /var/lib/ldap-account-manager/config/profiles/$file + fi +done +cd /var/lib/ldap-account-manager/config-samples/pdf +files=`ls -a default.*` +for file in $files; do + if [ ! -f /var/lib/ldap-account-manager/config/pdf/$file ]; then + cp $file /var/lib/ldap-account-manager/config/pdf/$file + fi +done +cd /var/lib/ldap-account-manager/config-samples/selfService +files=`ls -a default.*` +for file in $files; do + if [ ! -f /var/lib/ldap-account-manager/config/selfService/$file ]; then + cp $file /var/lib/ldap-account-manager/config/selfService/$file + fi +done if [ ! -h /usr/share/ldap-account-manager/lib/fpdf.php ]; then\ ln -s /usr/share/fpdf/fpdf.php /usr/share/ldap-account-manager/lib/fpdf.php; fi if [ ! -h /usr/share/ldap-account-manager/config ]; then\ diff --git a/lam-packaging/debian/rules b/lam-packaging/debian/rules index 809a5c4f..7001271e 100755 --- a/lam-packaging/debian/rules +++ b/lam-packaging/debian/rules @@ -19,12 +19,14 @@ install: install -D --mode=644 tmp/.htaccess debian/ldap-account-manager/var/lib/ldap-account-manager/tmp/.htaccess install -D --mode=644 config/.htaccess debian/ldap-account-manager/var/lib/ldap-account-manager/config/.htaccess install -D --mode=644 config/language debian/ldap-account-manager/var/lib/ldap-account-manager/config/language - install -D --mode=644 config/shells debian/ldap-account-manager/var/lib/ldap-account-manager/config/shells install -D --mode=644 config/lam.conf_sample debian/ldap-account-manager/var/lib/ldap-account-manager/config/lam.conf_sample install -D --mode=644 config/config.cfg_sample debian/ldap-account-manager/var/lib/ldap-account-manager/config/config.cfg_sample - cp -r config/profiles debian/ldap-account-manager/var/lib/ldap-account-manager/config/ - cp -r config/pdf debian/ldap-account-manager/var/lib/ldap-account-manager/config/ - cp -r config/selfService debian/ldap-account-manager/var/lib/ldap-account-manager/config/ + cp -r config/profiles debian/ldap-account-manager/usr/share/ldap-account-manager/config-samples/ + install -D --mode=644 config/profiles/.htaccess debian/ldap-account-manager/var/lib/ldap-account-manager/config/profiles/.htaccess + cp -r config/pdf debian/ldap-account-manager/usr/share/ldap-account-manager/config-samples/ + install -D --mode=644 config/pdf/.htaccess debian/ldap-account-manager/var/lib/ldap-account-manager/config/pdf/.htaccess + cp -r config/selfService debian/ldap-account-manager/usr/share/ldap-account-manager/config-samples/ + install -D --mode=644 config/selfService/.htaccess debian/ldap-account-manager/var/lib/ldap-account-manager/config/selfService/.htaccess cp -r graphics debian/ldap-account-manager/usr/share/ldap-account-manager/ install -D --mode=644 help/help.inc debian/ldap-account-manager/usr/share/ldap-account-manager/help/help.inc install -D --mode=644 lib/.htaccess debian/ldap-account-manager/usr/share/ldap-account-manager/lib/.htaccess @@ -54,6 +56,8 @@ binary-indep: build install install -D --mode=644 debian/lam.apache.conf debian/ldap-account-manager/etc/ldap-account-manager/apache.conf install -D --mode=644 config/config.cfg_sample debian/ldap-account-manager/etc/ldap-account-manager/config.cfg dh_link /etc/ldap-account-manager/config.cfg /var/lib/ldap-account-manager/config/config.cfg + install -D --mode=644 config/shells debian/ldap-account-manager/etc/ldap-account-manager/shells + dh_link /etc/ldap-account-manager/shells /var/lib/ldap-account-manager/config/shells install -D --mode=644 config/passwordMailTemplate.txt debian/ldap-account-manager/etc/ldap-account-manager/passwordMailTemplate.txt dh_link /etc/ldap-account-manager/passwordMailTemplate.txt /var/lib/ldap-account-manager/config/passwordMailTemplate.txt dh_installdebconf