fix init script
- to add newline to [OK] - to ignore 'config file testing succeeded' output of slaptest
This commit is contained in:
parent
01e94086a8
commit
808537b99d
11
ldap.init
11
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user