Hide Forgot
Description of problem: ====================== Using "service slapd condrestart" restarts correctly when slapd is running: # service slapd start Starting slapd: [ OK ] # service slapd condrestart Stopping slapd: [ OK ] Starting slapd: [ OK ] # service slapd status slapd (pid 2527) is running... # echo $? 0 But condrestart doesn't restart slapd when it is stopped: # service slapd stop Stopping slapd: [ OK ] # service slapd condrestart # echo $? 0 # service slapd status slapd is stopped # echo $? 3 Version-Release number of selected component (if applicable): ============================================================ openldap-servers-2.4.40-16.el6 How reproducible: ================ always Steps to Reproduce: ================== 1. service slapd stop 2. service slapd condrestart 3. service slapd status Actual results: ============== slapd is stopped Expected results: ================ slapd is running Additional info: ===============
Is not this the expected behaviour? I cannot find a manpage for sysV specifically but the systemd's equivalent should be the `try-restart` command of systemctl(1) (of course not to be found in RHEL-6) which has also an (undocumented?) `condrestart` option; quoting the manpage: Restart one or more units specified on the command line if the units are running. This does nothing if units are not running.
test case modified to expected behaviour and closing this ticket.