diff --git a/ldap.init b/ldap.init index 3f3614c..4ee201e 100644 --- a/ldap.init +++ b/ldap.init @@ -125,10 +125,13 @@ function configtest() { # Check the configuration file. slaptestout=`/sbin/runuser -m -s "$slaptest" -- "$user" $slaptestflags 2>&1` slaptestexit=$? +# slaptestout=`echo $slaptestout 2>/dev/null | grep -v "config file testing succeeded"` # print warning if slaptest passed but reports some problems - if test $slaptestexit == 0 -a -n "$slaptestout" ; then - echo -n $"Checking configuration files for $prog: " ; warning ; echo - echo "$slaptestout" + if test $slaptestexit == 0 ; then + if echo "$slaptestout" | grep -v "config file testing succeeded" >/dev/null ; then + echo -n $"Checking configuration files for $prog: " ; warning ; echo + echo "$slaptestout" + fi fi # report error if configuration file is wrong if test $slaptestexit != 0 ; then @@ -166,6 +169,7 @@ function start() { daemon --check=$prog ${slapd} -h "\"$harg\"" -u ${user} $OPTIONS $SLAPD_OPTIONS RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ldap + echo return $RETVAL } @@ -176,6 +180,7 @@ function stop() { killproc ${slapd} RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ldap /var/run/slapd.args + echo return $RETVAL }