From 66e89aa383d8c48973355da9b0c5d1b6e1295906 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 15 Sep 2008 23:25:37 +0200 Subject: Fix redirect error msg to stderr. --- ldap/mkldapdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldap/mkldapdb b/ldap/mkldapdb index 374e4cd..cade398 100755 --- a/ldap/mkldapdb +++ b/ldap/mkldapdb @@ -19,7 +19,7 @@ fi for var in basedn dnsdomain orgname backend; do if [ -z "`eval echo '$'$var`" ]; then - echo 2> "ERROR: Required variable '$var' missing. Exiting...!" + echo 1>&2 "ERROR: Required variable '$var' missing. Exiting...!" exit 1 fi done -- cgit v1.2.3 From 4c0b7e7eb7384499f4405badc4f7809c6e61d50d Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 15 Sep 2008 23:35:22 +0200 Subject: Grab orgname from /etc/local-ORG/orgname. --- ldap/mkldapdb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldap/mkldapdb b/ldap/mkldapdb index cade398..443ac44 100755 --- a/ldap/mkldapdb +++ b/ldap/mkldapdb @@ -13,8 +13,8 @@ checkpoint="checkpoint 512 30" backend="bdb" backendoptions="# For the Debian package we use 2MB as default but be sure to update this\n# value if you have plenty of RAM\ndbconfig set_cachesize 0 2097152 0\n\n# Sven Hartge reported that he had to set this value incredibly high\n# to get slapd running at all. See http:\/\/bugs.debian.org\/303057\n# for more information.\n\n# Number of objects that can be locked at the same time.\ndbconfig set_lk_max_objects 1500\n# Number of locks (both requested and granted)\ndbconfig set_lk_max_locks 1500\n# Number of lockers\ndbconfig set_lk_max_lockers 1500" -if [ -r /etc/local/org.conf ]; then - . /etc/local/org.conf +if [ -r /etc/local-ORG/orgname ]; then + orgname="$(head -n 1 /etc/local-ORG/orgname)" fi for var in basedn dnsdomain orgname backend; do -- cgit v1.2.3 From db6580949fecaa7c21315ab3e8055823b73dc548 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 15 Sep 2008 23:41:20 +0200 Subject: Add core horde config. --- ldap/db/base.ldif.in | 5 +++++ ldap/db/horde.ldif.in | 6 ++++++ ldap/mkldapdb | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 ldap/db/horde.ldif.in diff --git a/ldap/db/base.ldif.in b/ldap/db/base.ldif.in index 8b9d263..2d1a0d6 100644 --- a/ldap/db/base.ldif.in +++ b/ldap/db/base.ldif.in @@ -5,6 +5,11 @@ objectClass: organization o: @DOMAIN@ dc: @ORG@ +dn: ou=DSA, @SUFFIX@ +objectclass: organizationalUnit +ou: DSA +description: Directory System Agent + dn: ou=people, @SUFFIX@ objectClass: organizationalUnit ou: people diff --git a/ldap/db/horde.ldif.in b/ldap/db/horde.ldif.in new file mode 100644 index 0000000..0e1bab0 --- /dev/null +++ b/ldap/db/horde.ldif.in @@ -0,0 +1,6 @@ +dn: cn=horde, ou=DSA, @SUFFIX@ +objectclass: organizationalRole +objectClass: top +objectClass: simpleSecurityObject +userPassword: superSecretPassword +cn: horde diff --git a/ldap/mkldapdb b/ldap/mkldapdb index 443ac44..ce9a8c6 100755 --- a/ldap/mkldapdb +++ b/ldap/mkldapdb @@ -29,7 +29,7 @@ tempdir=`mktemp -dt slapd.XXXXXX` cfgdir=/etc/ldap dbdir=/var/lib/ldap -for section in base; do +for section in base horde; do sed <"$masterdir/$section.ldif.in" >"$tempdir/$section.ldif" \ -e "s/@SUFFIX@/$basedn/g" \ -e "s/@DOMAIN@/$dnsdomain/g" \ -- cgit v1.2.3