Gentoo Archives: gentoo-user

From: Willie Wong <wwong@××××××××××××××.edu>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] autossh
Date: Thu, 10 Sep 2009 09:32:44
Message-Id: 20090910093310.GA24242@princeton.edu
In Reply to: Re: [gentoo-user] autossh by Kaushal Shriyan
1 On Wed, Sep 09, 2009 at 11:08:43PM +0530, Penguin Lover Kaushal Shriyan squawked:
2 > file `which autossh`
3 > /usr/bin/autossh: POSIX shell script text executable
4 >
5 > http://paste.ubuntu.com/268077/
6 >
7 > I dont see any of my env variables being called in that bash shell script.
8 >
9 > Please suggest and guide
10 >
11 > Thanks for the explanation.
12
13
14 Hum, do this for me, would ya?
15
16 (1) what happens when you run
17 AUTOSSH_POLL=100 /usr/lib/autossh/autossh .....
18
19 (2) first cp /usr/bin/autossh to your home directory,
20 and edit it to replace the line
21
22 exec /usr/lib/autossh/autossh "$@"
23
24 with
25
26 env | grep AUTOSSH
27
28 Then in your shell call ./autossh (just that, not options).
29 What happens?
30
31 -----------------------
32
33 If I remember correctly, shell environmental variables are supposed to
34 be passed to child shells. So scripts are supposed to inherit those
35 variables. So we are now trying to figure out whether it is the shell
36 that is broken or it is the autossh binary that is broken.
37
38 Best,
39
40 W
41 --
42 Q: "What is the best way to determine the volume of a little red ball."
43 Physicist: Measure the diameter, devide by two for radius and use the
44 formula 4/3 * PI * radius ^ 3
45 Chemist: Take a beaker, fill it with water. Dunk the ball in it, and
46 measure the amount of water displaced.
47 Engineer: It's easy, just pull out the "Little Red Ball" book and look it up.
48 Sortir en Pantoufles: up 1007 days, 8:05