[scl.org] Enabe Ruby193 in postfix context

Petr Pisar ppisar at redhat.com
Mon Sep 12 08:19:21 UTC 2016

On Fri, Sep 09, 2016 at 07:21:59PM +0200, Gabriele Pohl wrote:
> I tried to apply a recipe, that I found in your mailing list archive
> https://www.redhat.com/archives/sclorg/2016-June/msg00008.html
> test -f /opt/rh/ruby193/enable && source /opt/rh/ruby193/enable
> I stored this command to /etc/profile.d/ruby.sh
> It resulted in having ruby193 enabled in all user shells.
> But the error in postfix aliases context was
> not solved by it.

Because profile scripts are executed only for login and interactive shells.
The scripts run by postfix are neither of them.

Either you can play with BASH_ENV environment variable (read bash(1) manual)
or, I recommend, create a simple wrapper around your ruby script that will
siply execute the real script in the enabled enviroment, like:

scl enable ruby193 /the/real/script

-- Petr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/sclorg/attachments/20160912/2405b26a/attachment.sig>

More information about the SCLorg mailing list