diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-03-07 05:29:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:21 -0500 |
commit | 41a72a506fce51737992c8ea3201ef35dcafd73a (patch) | |
tree | 9c4becddfd4ddc6271f5437fccee976d1e243f28 /source4/script | |
parent | 4362ce99ec3451ce5061a7de04851750c3bd7e23 (diff) | |
download | samba-41a72a506fce51737992c8ea3201ef35dcafd73a.tar.gz samba-41a72a506fce51737992c8ea3201ef35dcafd73a.tar.bz2 samba-41a72a506fce51737992c8ea3201ef35dcafd73a.zip |
r21739: Make it easy to change the log level for the slapd processes, and have
the logs go to a file.
Andrew Bartlett
(This used to be commit 9aaa19319718a5a8fcc1df066cbce67eaa3431d8)
Diffstat (limited to 'source4/script')
-rw-r--r-- | source4/script/tests/Samba4.pm | 6 | ||||
-rwxr-xr-x | source4/script/tests/mk-fedora-ds.sh | 2 | ||||
-rwxr-xr-x | source4/script/tests/mk-openldap.sh | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/source4/script/tests/Samba4.pm b/source4/script/tests/Samba4.pm index f81d75ffd3..99e329e7b9 100644 --- a/source4/script/tests/Samba4.pm +++ b/source4/script/tests/Samba4.pm @@ -15,15 +15,15 @@ use POSIX; 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; diff --git a/source4/script/tests/mk-fedora-ds.sh b/source4/script/tests/mk-fedora-ds.sh index 4c8732971c..a36e7defee 100755 --- a/source4/script/tests/mk-fedora-ds.sh +++ b/source4/script/tests/mk-fedora-ds.sh @@ -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 diff --git a/source4/script/tests/mk-openldap.sh b/source4/script/tests/mk-openldap.sh index 0533d46a66..d58ce7480d 100755 --- a/source4/script/tests/mk-openldap.sh +++ b/source4/script/tests/mk-openldap.sh @@ -1,6 +1,8 @@ SLAPD_CONF=$LDAPDIR/slapd.conf export SLAPD_CONF +echo "OPENLDAP_LOGLEVEL=0" + cat >$SLAPD_CONF <<EOF loglevel 0 |