[scl.org] Enabe Ruby193 in postfix context

Gabriele Pohl contact at dipohl.de
Tue Sep 13 15:35:31 UTC 2016


Hi Petr,

On Mon, 12 Sep 2016 10:19:21 +0200
Petr Pisar <ppisar at redhat.com> wrote:

> On Fri, Sep 09, 2016 at 07:21:59PM +0200, Gabriele Pohl wrote:
> > 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.
> 
> I recommend, create a simple wrapper around your ruby script that will
> siply execute the real script in the enabled enviroment, like:
> 
> #!/bin/sh
> scl enable ruby193 /the/real/script

I tried this, but it doesn't work either:

Created a wrapper script "schleuder-wrapper.sh" with following content:

#!/bin/sh
scl enable ruby193 /opt/rh/ruby193/root/usr/local/bin/schleuder listname at hostname

Then I changed the entry in /etc/aliases to this:

name: "|<PATH>/schleuder-wrapper.sh"

This is the error message in postfix log,
when sending mail to the alias name:

Command died with status 1: "<PATH>/schleuder-wrapper.sh". 
Command output: Unable to open /etc/scl/prefixes//opt/rh/ruby193/root/usr/local/bin/schleuder! 

Can you explain what happened here?

fyi and thanks for your support!

Gabriele




More information about the SCLorg mailing list