summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b92afaa)
raw | patch | inline | side by side (parent: b92afaa)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 16 Sep 2008 16:57:07 +0000 (16:57 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 16 Sep 2008 16:57:07 +0000 (16:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12491 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/debian/gosa-si-server.postinst | patch | blob | history | |
gosa-si/debian/rules | patch | blob | history |
index cae8615a6d6164aac92dbdf6c5116de23dd03c71..e20a28fc9b65671c57c5b6aa758d71cee2dfc660 100644 (file)
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#
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
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 96893b185366688526863212f821378c9a409ed6..0b12205ef94d6a4518c212521710792da4ced21f 100755 (executable)
--- a/gosa-si/debian/rules
+++ b/gosa-si/debian/rules
# 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
#********************************************************
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