If you do not pass an instance name, or you pass a wrong instance name, or there are no instances available the init scripts will warn on stdout but will still return 0 to the shell. An error number should be returned instead.
Created attachment 476498 [details] Patch
Pushed to master. Thanks to Noriko for her review! Counting objects: 9, done. Delta compression using up to 2 threads. Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 1.18 KiB, done. Total 5 (delta 4), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git b5bee52..5a41728 master -> master
Which init scripts, can you please be more specific and adds steps to reproduce the issue? Thanks
(In reply to comment #3) > Which init scripts, can you please be more specific and adds steps to reproduce > the issue? Thanks step 1 - after a yum install on a clean system, do service dirsrv start && echo success you should not see the echo success service dirsrv start || echo failed you should see the echo failed step 2 - if you have run setup to create a directory server instance /etc/dirsrv/slapd-localhost, then try to run service dirsrv restart bogus && echo success it should not do the echo success if you try to run service dirsrv restart bogus || echo failed you should see the echo failed
Step 1: [root@amsharma etc]# service dirsrv start && echo success *** Error: no dirsrv instances configured [root@amsharma etc]# service dirsrv start || echo failed *** Error: no dirsrv instances configured failed Step 2 [root@testvm scripts]# ps -aef | grep slapd nobody 13191 1 0 13:08 ? 00:00:06 /usr/sbin/ns-slapd -D /etc/dirsrv/slapd-testvm -i /var/run/dirsrv/slapd-testvm.pid -w /var/run/dirsrv/slapd-testvm.startpid root 14005 3931 0 16:13 pts/1 00:00:00 grep slapd [root@testvm scripts]# service dirsrv restart bogus && echo success bogus is an invalid dirsrv instance [FAILED] [root@testvm scripts]# service dirsrv restart bogus || echo failed bogus is an invalid dirsrv instance [FAILED] failed