From: janw Date: Tue, 16 Sep 2008 16:57:07 +0000 (+0000) Subject: Fixed debconf. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2c481343c271bdf57e937f618c8722f3995c98bb;p=gosa.git Fixed debconf. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12491 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/debian/gosa-si-server.postinst b/gosa-si/debian/gosa-si-server.postinst index cae8615a6..e20a28fc9 100644 --- a/gosa-si/debian/gosa-si-server.postinst +++ b/gosa-si/debian/gosa-si-server.postinst @@ -7,11 +7,11 @@ set -e db_version 2.0 for i in hostname database username password rootpw; do - db_get gosa-si/db$i || true - eval db$i'="$RET"' + db_get gosa-si/$i || true + eval $i'="$RET"' done -dbhost="127.0.0.1" +host="127.0.0.1" #DEBHELPER# @@ -25,8 +25,8 @@ case "$1" in esac # Setup database -/usr/bin/mysqladmin -u root --password="$rootpw" create "$database" &> /dev/null -/usr/bin/mysql -u root --password="$rootpw" -e "GRANT ALL PRIVILEGES ON $database.* to \'$username\'@\'127.0.0.1\' identified by '$password'" +/usr/bin/mysqladmin -u root --password=$rootpw create "$database" &> /dev/null || true +/usr/bin/mysql -u root --password=$rootpw -e "GRANT ALL PRIVILEGES ON $database.* to '$username'@'127.0.0.1' identified by '$password'" # Fix permission [ -f /etc/gosa-si/server.conf ] && chmod go-rwx /etc/gosa-si/server.conf @@ -35,18 +35,15 @@ esac if [ -w /etc/gosa-si/server.conf ]; then for i in database username password host; do eval 'val=$'$i - grep -E "$i" /etc/gosa-si/server.conf | grep -vE '^ *#' - if [ $? -eq 0 ]; then - sed -i "/\[server\]/,/\[/s/mysql-$i\s*=\s*\(.*\)$/mysql-$i = $val/g" /etc/gosa-si/server.conf - else - sed -i " - /\[server\]/ a\ + grep -E "mysql-$i" /etc/gosa-si/server.conf | grep -vE '^ *#' && sed -i "/\[server\]/,/\[/s/mysql-$i\s*=\s*\(.*\)$/mysql-$i = $val/g" /etc/gosa-si/server.conf || sed -i " +/\[server\]/ a\ mysql-$i = $val" /etc/gosa-si/server.conf - fi done fi # Restart daemon invoke-rc.d gosa-si restart +db_stop + exit 0 diff --git a/gosa-si/debian/rules b/gosa-si/debian/rules index 96893b185..0b12205ef 100755 --- a/gosa-si/debian/rules +++ b/gosa-si/debian/rules @@ -2,7 +2,7 @@ # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. # Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +# export DH_VERBOSE=1 build: patch #******************************************************** @@ -37,7 +37,7 @@ install-stamp: done -find debian/tmp -name '*.svn' -type d -exec rm -rf {} \; 2> /dev/null - -for i in gosa-si-client gosa-si-server modules/GosaPackages.pm modules/ClientPackages.pm modules/ServerPackages.pm server/events/*; do sed -i 's/use GosaSupportDaemon;/use GOSA::GosaSupportDaemon;/g;s/use DBsqlite;/use GOSA::DBsqlite;/g' debian/tmp/$$i; done + -for i in gosa-si-client gosa-si-server modules/GosaPackages.pm modules/ClientPackages.pm modules/ServerPackages.pm server/events/*; do sed -i 's/use GosaSupportDaemon;/use GOSA::GosaSupportDaemon;/g;s/use DBmysql;/use GOSA::DBmysql;/g' debian/tmp/$$i; done -sed -i 's!"/etc/gosa-si/modules";!use lib "/usr/lib/gosa-si/modules";!g' debian/tmp/gosa-si-server