[scl.org] Enabe Ruby193 in postfix context

Dominic Cleal dominic at cleal.org
Wed Sep 14 07:07:12 UTC 2016


On 13/09/16 16:35, Gabriele Pohl wrote:
> 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

The command must be quoted:

scl enable ruby193 "/opt/rh/ruby193/root/usr/local/bin/schleuder
listname at hostname"

or use "--":

scl enable ruby193 -- /opt/rh/ruby193/root/usr/local/bin/schleuder
listname at hostname

-- 
Dominic Cleal
dominic at cleal.org




More information about the SCLorg mailing list