#48448 dirsrv start-stop fail in certain shell environments.
Closed: wontfix None Opened 8 years ago by firstyear.

We commonly use the pattern:

cd $SERVERBIN_DIR; ./ns-slapd

The issue with this is that under certain shell environments, this fails.

/usr/sbin/start-dirsrv: line 73: ./ns-slapd: No such file or directory

We should change this to:

$SERVERBIN_DIR/ns-slapd

This is explicit and avoids the shell issues that we are experiencing between newer el versions and other linux platforms.

Note: This will need backporting to 1.3.4.X


Looks good to me.

I was wondering any code expects to be in the directory after the "cd $SERVERBIN_DIR" line, but I did not see any. So, it should be safe.

Could you please tell us how to reproduce "./ns-slapd: No such file or directory"?

I can reproduce on gentoo out of the box, all scripts break.

I can reproduce on latest EL7 installing freeipa (ipa fails to install as ldif2db cannot run)

I initially saw this on EL7, but assumed it was a local system issue. When I could reproduce on a second EL7 system, and during my port to gentoo, I decided that it was a more serious shell environment issue, so it should be corrected.

Thanks for the ack!

To ssh://git.fedorahosted.org/git/389/ds.git
257006f..1d4fcea master -> master

commit 1d4fcea

Replying to [comment:3 firstyear]:

I can reproduce on gentoo out of the box, all scripts break.

I can reproduce on latest EL7 installing freeipa (ipa fails to install as ldif2db cannot run)

I initially saw this on EL7, but assumed it was a local system issue. When I could reproduce on a second EL7 system, and during my port to gentoo, I decided that it was a more serious shell environment issue, so it should be corrected.

Whoa. They look serious. What "shell" is being used on them?

EL7 was bash, one was zsh. Gentoo was bash.

I think there is something around how our scripts call to /bin/sh not /bin/bash. It changes the way bash functions.

But it's only recently this has started to break (for me) at least. I think that a defensive solution like this, is the best one.

Pushed to 1.3.4:

To ssh://git.fedorahosted.org/git/389/ds.git
5453bfe..099883c 389-ds-base-1.3.4 -> 389-ds-base-1.3.4

commit 099883c

Metadata Update from @nhosoi:
- Issue assigned to firstyear
- Issue set to the milestone: 0.0 NEEDS_TRIAGE

7 years ago

Metadata Update from @vashirov:
- Issue set to the milestone: None (was: 0.0 NEEDS_TRIAGE)

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1770

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata