#47511 bashisms in 389-ds-base admin scripts
Closed: Fixed None Opened 6 years ago by mvocu.

The shell scripts in 389-ds-base/ldap/admin/src/scripts use 'source' to source common scripts; the 'source' keyword is bash-specific (or c-shell, if memory serves). The interpreter is set to /bin/sh, which is not guaranteed to be bash (and at least on Debian 7.1 it is dash).

The 'source' keyword can be replaced by '.', which should work.

Can you provide patches?

patch to replace 'source' with '.'

Sure - patch attached.

that patch isn't enough, here's a new version

new patch with other bashisms fixed

This patch is for 389-ds-base, not admin server. Set to needs triage...

I've fixed the Debian packaging to just use bash instead of sh, maybe that's easiest here too.

I merged the patchesadmin_scripts.diff​ and fix-bashisms​ provided by tjaalton into one 0001-Ticket-47511-bashisms-in-389-ds-base-admin-scripts.patch with a couple of minor fixes.

Reviewed and tested by nhosoi.


Pushed to master:
a799c46..2ce7a73 master -> master
commit 2ce7a73

Pushed to 389-ds-base-1.3.4:
29c669e..4924591 389-ds-base-1.3.4 -> 389-ds-base-1.3.4
commit 4924591

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.3.4 backlog

3 years ago

Login to comment on this ticket.