Re: [CentOS] Source keychain credentials in Perl?

2008-03-05 Thread Filipe Brandenburger
On Wed, Mar 5, 2008 at 10:20 AM, Sean Carolan [EMAIL PROTECTED] wrote: I would like these environment variables to be made available to a Perl script so that any system commands contained in the perl script will inherit them. How do you do this in Perl? If the variables are exported when

Re: [CentOS] Source keychain credentials in Perl?

2008-03-05 Thread Sean Carolan
If the variables are exported when you call Perl, they will be available inside Perl. And, when you call system, they will be available for those processes as well. Are you having any specific problems doing this? If you can't make it work, please send more details on what exactly is not

Re: [CentOS] Source keychain credentials in Perl?

2008-03-05 Thread Filipe Brandenburger
On Wed, Mar 5, 2008 at 11:03 AM, Sean Carolan [EMAIL PROTECTED] wrote: The variables are not exported when I call Perl. This is what I am trying to do. How do I get those variables to be available to the bash system commands within the script? system(source ~/.keychain/hostname-sh; cmd);

Re: [CentOS] Source keychain credentials in Perl?

2008-03-05 Thread Sean Carolan
One solution would be to source ~/.keychain/hostname-sh in the shell before calling the perl script. That should work. Ok, can't do this because end-users will not like the extra step. Another one would be to source it before calling scp: system (source ~/.keychain/hostname-sh;

Re: [CentOS] Source keychain credentials in Perl?

2008-03-05 Thread Stephen Harris
On Wed, Mar 05, 2008 at 11:00:13AM -0600, Sean Carolan wrote: system(source ~/.keychain/hostname-sh; cmd); Is this what you're looking for? Yes, this works. Is there a way to only source the file once? There are a bit over a dozen scp and ssh commands in the script. Unfortunately