[SOLVED] Re: need assist with upstart config problem

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



On Wed May 30 17:57:49 EDT 2012, Nataraj wrote:
> On Wed, May 30, 2012 17:00, James B. Byrne wrote:
>> I am trying, without success, to create an upstart config file to
>> automatically start and restart an ssh proxy.  The command sting that
>> I use in the script has been checked and verified from the shell but
>> it fails in the upstart file.
>>
> The '-f option' tells SSH to run in the background, but normally
> upstart expects to wait for the process.  Maybe you want '-n'
> instead of '-f'.  Alternatively, if you run a program in the
> background you could specify 'task' in the config file to tell
> upstart not to wait for the process (you couldn't use respawn
> with that because then the process is not managed by upstart
> anymore).

The problem in my script appears to be this:

#  SSH switches used:
env SSH_SWITCHES=""
env SSH_SWITCHES=${SSH_SWITCHES}" -nNqT -vvv "

Upon further investigation I discovered that the env stanza does not
expand previously defined variables. My attempt at concatenating
values results in the key name being used instead of its value.
In other words: '${SSH_SWITCHES} -nNqT -vvv' is what results and not
simply '-nNqT -vvv' as one might expect.   Exporting the value between
env stanzas does not change this behaviour.

Eliminating the concatenation attempts resolved the issue.


-- 
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB@xxxxxxxxxxxxx
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux