svn commit: samba r21739 - in
branches/SAMBA_4_0/source/script/tests: .
abartlet at samba.org
abartlet at samba.org
Wed Mar 7 05:29:13 GMT 2007
Author: abartlet
Date: 2007-03-07 05:29:12 +0000 (Wed, 07 Mar 2007)
New Revision: 21739
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21739
Log:
Make it easy to change the log level for the slapd processes, and have
the logs go to a file.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/script/tests/Samba4.pm
branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh
branches/SAMBA_4_0/source/script/tests/mk-openldap.sh
Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/Samba4.pm
===================================================================
--- branches/SAMBA_4_0/source/script/tests/Samba4.pm 2007-03-07 05:09:37 UTC (rev 21738)
+++ branches/SAMBA_4_0/source/script/tests/Samba4.pm 2007-03-07 05:29:12 UTC (rev 21739)
@@ -15,15 +15,15 @@
sub slapd_start($$)
{
- my ($conf, $uri) = @_;
+ my ($conf, $uri, $loglevel) = @_;
# running slapd in the background means it stays in the same process group, so it can be
# killed by timelimit
if (defined($ENV{FEDORA_DS_PREFIX})) {
- system("$ENV{FEDORA_DS_PREFIX}/sbin/ns-slapd -D $ENV{FEDORA_DS_DIR} -d0 &");
+ system("$ENV{FEDORA_DS_PREFIX}/sbin/ns-slapd -D $ENV{FEDORA_DS_DIR} -d$ENV{FEDORA_DS_LOGLEVEL} > $ENV{LDAPDIR}/logs 2>&1 &");
} else {
my $oldpath = $ENV{PATH};
$ENV{PATH} = "/usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH}";
- system("slapd -d0 -f $conf -h $uri &");
+ system("slapd -d$ENV{OPENLDAP_LOGLEVEL} -f $conf -h $uri > $ENV{LDAPDIR}/logs 2>&1 &");
$ENV{PATH} = $oldpath;
}
return 1;
Modified: branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh 2007-03-07 05:09:37 UTC (rev 21738)
+++ branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh 2007-03-07 05:29:12 UTC (rev 21739)
@@ -1,6 +1,8 @@
FEDORA_DS_INF=$LDAPDIR/fedorads.inf
FEDORA_DS_INITIAL_LDIF=$LDAPDIR/fedorads-initial.ldif
+echo "FEDORA_DS_LOGLEVEL=0"
+
#Make the subdirectory be as fedora DS would expect
FEDORA_DS_DIR=$LDAPDIR/slapd-samba4
echo FEDORA_DS_DIR=$FEDORA_DS_DIR
Modified: branches/SAMBA_4_0/source/script/tests/mk-openldap.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/mk-openldap.sh 2007-03-07 05:09:37 UTC (rev 21738)
+++ branches/SAMBA_4_0/source/script/tests/mk-openldap.sh 2007-03-07 05:29:12 UTC (rev 21739)
@@ -1,6 +1,8 @@
SLAPD_CONF=$LDAPDIR/slapd.conf
export SLAPD_CONF
+echo "OPENLDAP_LOGLEVEL=0"
+
cat >$SLAPD_CONF <<EOF
loglevel 0
More information about the samba-cvs
mailing list