[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [scl.org] Enabe Ruby193 in postfix context



On 13/09/16 16:35, Gabriele Pohl wrote:
> Hi Petr,
> 
> On Mon, 12 Sep 2016 10:19:21 +0200
> Petr Pisar <ppisar 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 hostname

The command must be quoted:

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

or use "--":

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

-- 
Dominic Cleal
dominic cleal org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]