Re: [gentoo-user] autossh

2009-09-10 Thread Willie Wong
On Wed, Sep 09, 2009 at 11:08:43PM +0530, Penguin Lover Kaushal Shriyan 
squawked:
 file `which autossh`
 /usr/bin/autossh: POSIX shell script text executable
 
 http://paste.ubuntu.com/268077/
 
 I dont see any of my env variables being called in that bash shell script.
 
 Please suggest and guide
 
 Thanks for the explanation.


Hum, do this for me, would ya?

(1) what happens when you run 
AUTOSSH_POLL=100 /usr/lib/autossh/autossh .

(2) first cp /usr/bin/autossh to your home directory,
and edit it to replace the line

exec /usr/lib/autossh/autossh $@

with 

env | grep AUTOSSH

Then in your shell call ./autossh (just that, not options). 
What happens?

---

If I remember correctly, shell environmental variables are supposed to
be passed to child shells. So scripts are supposed to inherit those
variables. So we are now trying to figure out whether it is the shell
that is broken or it is the autossh binary that is broken. 

Best, 

W
-- 
Q: What is the best way to determine the volume of a little red ball.
Physicist: Measure the diameter, devide by two for radius and use the 
  formula 4/3 * PI * radius ^ 3
Chemist: Take a beaker, fill it with water. Dunk the ball in it, and 
  measure the amount of water displaced.
Engineer: It's easy, just pull out the Little Red Ball book and look it up.
Sortir en Pantoufles: up 1007 days,  8:05



Re: [gentoo-user] autossh

2009-09-09 Thread Kaushal Shriyan
On Wed, Sep 9, 2009 at 1:09 AM, Joshua Murphypoiso...@gmail.com wrote:
 On Tue, Sep 8, 2009 at 7:12 AM, Kaushal Shriyankaushalshri...@gmail.com 
 wrote:
 Hi

 I am having issue with autossh host, I get

 autossh[13221]: checking for grace period, tries = 0
 autossh[13221]: starting ssh (count 1)
 autossh[13221]: ssh child pid is 13224
 autossh[13221]: check on child 13224
 autossh[13221]: set alarm for 600 secs
 autossh[13224]: execing /usr/bin/ssh

 My Autossh setting in my .bashrc are as  below

 export AUTOSSH_GATETIME=0
 export AUTOSSH_POLL=100
 export AUTOSSH_PORT=20020
 export AUTOSSH_DEBUG=1

 When i test by disconnecting and reconnecting the internet, It takes
 10mins to prompt for a password. Can this time interval be reduced ?

 Thanks and Regards,

 Kaushal

 Where are you starting autossh from? The AUTOSSH_POLL variable in your
 .bashrc is, it would appear, being disregarded in whatever context
 autossh is starting in, otherwise you'd be seeing an up to 1 minute,
 40 second delay on reconnecting, not 10 minutes.

 --
 Poison [BLX]
 Joshua M. Murphy



Hi Joshua

I am starting autossh somehost from the same gnome-terminal tab
session where my .bashrc is located

Any further clue ?

Thanks and Regards,

Kaushal



Re: [gentoo-user] autossh

2009-09-09 Thread Willie Wong
On Wed, Sep 09, 2009 at 11:34:31AM +0530, Penguin Lover Kaushal Shriyan 
squawked:
 On Wed, Sep 9, 2009 at 1:09 AM, Joshua Murphypoiso...@gmail.com wrote:
  On Tue, Sep 8, 2009 at 7:12 AM, Kaushal Shriyankaushalshri...@gmail.com 
  wrote:
  export AUTOSSH_GATETIME=0
  export AUTOSSH_POLL=100
  export AUTOSSH_PORT=20020
  export AUTOSSH_DEBUG=1
 
  Where are you starting autossh from? The AUTOSSH_POLL variable in your
  .bashrc is, it would appear, being disregarded in whatever context
  autossh is starting in, otherwise you'd be seeing an up to 1 minute,
  40 second delay on reconnecting, not 10 minutes.
 I am starting autossh somehost from the same gnome-terminal tab
 session where my .bashrc is located
 
 Any further clue ?
 

Did you open a new gnome-terminal after editing .bashrc?

In the same terminal, what is the output when you type

env | grep AUTOSSH

?

W
-- 
Fahnestock's Rule for failure:
  If at first you don't succeed, destroy all evidence that you tried.
Sortir en Pantoufles: up 1006 days,  7:37



Re: [gentoo-user] autossh

2009-09-09 Thread Kaushal Shriyan
On Wed, Sep 9, 2009 at 2:16 PM, Willie Wongww...@math.princeton.edu wrote:
 On Wed, Sep 09, 2009 at 11:34:31AM +0530, Penguin Lover Kaushal Shriyan 
 squawked:
 On Wed, Sep 9, 2009 at 1:09 AM, Joshua Murphypoiso...@gmail.com wrote:
  On Tue, Sep 8, 2009 at 7:12 AM, Kaushal Shriyankaushalshri...@gmail.com 
  wrote:
  export AUTOSSH_GATETIME=0
  export AUTOSSH_POLL=100
  export AUTOSSH_PORT=20020
  export AUTOSSH_DEBUG=1
 
  Where are you starting autossh from? The AUTOSSH_POLL variable in your
  .bashrc is, it would appear, being disregarded in whatever context
  autossh is starting in, otherwise you'd be seeing an up to 1 minute,
  40 second delay on reconnecting, not 10 minutes.
 I am starting autossh somehost from the same gnome-terminal tab
 session where my .bashrc is located

 Any further clue ?


 Did you open a new gnome-terminal after editing .bashrc?

 In the same terminal, what is the output when you type

 env | grep AUTOSSH

 ?

 W
 --
 Fahnestock's Rule for failure:
  If at first you don't succeed, destroy all evidence that you tried.
 Sortir en Pantoufles: up 1006 days,  7:37



Hi Willie Wong

$env | grep AUTOSSH
AUTOSSH_GATETIME=0
AUTOSSH_POLL=10

I opened a new gnome-terminal

Any further clue ?

Thanks and Regards

Kaushal



Re: [gentoo-user] autossh

2009-09-09 Thread Willie Wong
On Wed, Sep 09, 2009 at 02:38:21PM +0530, Penguin Lover Kaushal Shriyan 
squawked:
 $env | grep AUTOSSH
 AUTOSSH_GATETIME=0
 AUTOSSH_POLL=10
 
 I opened a new gnome-terminal
 
 Any further clue ?

Okay, try running autossh with the environment variable specified on
the commandline, aka

AUTOSSH_POLL=100 autossh

and check the logs to see whether it reacted to that request. If not,
run

which autossh

and 

file `which autossh`

and post the output. 

W
-- 
Have you heard about Ron Howard's new movie? The travel
documentary about northern Europe?  It's called Mr. Opie's Holland.
Sortir en Pantoufles: up 1006 days, 10:39



Re: [gentoo-user] autossh

2009-09-09 Thread Kaushal Shriyan
On Wed, Sep 9, 2009 at 5:21 PM, Willie Wongww...@math.princeton.edu wrote:
 On Wed, Sep 09, 2009 at 02:38:21PM +0530, Penguin Lover Kaushal Shriyan 
 squawked:
 $env | grep AUTOSSH
 AUTOSSH_GATETIME=0
 AUTOSSH_POLL=10

 I opened a new gnome-terminal

 Any further clue ?

 Okay, try running autossh with the environment variable specified on
 the commandline, aka

 AUTOSSH_POLL=100 autossh

 and check the logs to see whether it reacted to that request. If not,
 run

 which autossh

 and

 file `which autossh`

 and post the output.

 W
 --
 Have you heard about Ron Howard's new movie? The travel
 documentary about northern Europe?      It's called Mr. Opie's Holland.
 Sortir en Pantoufles: up 1006 days, 10:39


Hi

$ AUTOSSH_POLL=100 autossh hostxxx
autossh[16050]: checking for grace period, tries = 0
autossh[16050]: starting ssh (count 1)
autossh[16053]: execing /usr/bin/ssh
autossh[16050]: ssh child pid is 16053
autossh[16050]: check on child 16053
autossh[16050]: set alarm for 600 secs
^Cautossh[16050]: received signal to exit (2)
$ which autossh
/usr/bin/autossh
$

Thanks and Regards

Kaushal



Re: [gentoo-user] autossh

2009-09-09 Thread Willie Wong
On Wed, Sep 09, 2009 at 06:11:20PM +0530, Penguin Lover Kaushal Shriyan 
squawked:
  file `which autossh`

What about this command? I want to see if autossh is a wrapper script
so that it has its own environment. 

 $ AUTOSSH_POLL=100 autossh hostxxx
 autossh[16050]: checking for grace period, tries = 0
 autossh[16050]: starting ssh (count 1)
 autossh[16053]: execing /usr/bin/ssh
 autossh[16050]: ssh child pid is 16053
 autossh[16050]: check on child 16053
 autossh[16050]: set alarm for 600 secs
 ^Cautossh[16050]: received signal to exit (2)

Regardless, you should file a bug. The way it is ignoring the
environmental variable is definitely different from what the man page
says it should do. 

The only things I can think of that gives it such behaviour is either

(i) The software itself is broken and doesn't respect the variable.
(ii) /usr/bin/autossh is actually a wrapper script so you need to set
the variables in there, instead of in your .bashrc. 

For either case, the behaviour is not consistent with the man page. 

W
-- 
M: Hey, do that again! Make the computer beep...
W: As you wish!
M: ah~~ ah~~... hum, that beep was a G.
W: how can you tell? 
(turn around)
oh... no fair... a tuner
Sortir en Pantoufles: up 1006 days, 16:16



Re: [gentoo-user] autossh

2009-09-09 Thread Kaushal Shriyan
On Wed, Sep 9, 2009 at 10:58 PM, Willie Wongww...@math.princeton.edu wrote:
 On Wed, Sep 09, 2009 at 06:11:20PM +0530, Penguin Lover Kaushal Shriyan 
 squawked:
  file `which autossh`

 What about this command? I want to see if autossh is a wrapper script
 so that it has its own environment.

 $ AUTOSSH_POLL=100 autossh hostxxx
 autossh[16050]: checking for grace period, tries = 0
 autossh[16050]: starting ssh (count 1)
 autossh[16053]: execing /usr/bin/ssh
 autossh[16050]: ssh child pid is 16053
 autossh[16050]: check on child 16053
 autossh[16050]: set alarm for 600 secs
 ^Cautossh[16050]: received signal to exit (2)

 Regardless, you should file a bug. The way it is ignoring the
 environmental variable is definitely different from what the man page
 says it should do.

 The only things I can think of that gives it such behaviour is either

 (i) The software itself is broken and doesn't respect the variable.
 (ii) /usr/bin/autossh is actually a wrapper script so you need to set
 the variables in there, instead of in your .bashrc.

 For either case, the behaviour is not consistent with the man page.

 W
 --
 M: Hey, do that again! Make the computer beep...
 W: As you wish!
 M: ah~~ ah~~... hum, that beep was a G.
 W: how can you tell?
 (turn around)
 oh... no fair... a tuner
 Sortir en Pantoufles: up 1006 days, 16:16



Hi Willie Wong

file `which autossh`
/usr/bin/autossh: POSIX shell script text executable

http://paste.ubuntu.com/268077/

I dont see any of my env variables being called in that bash shell script.

Please suggest and guide

Thanks for the explanation.

Thanks and Regards,

Kaushal



Re: [gentoo-user] autossh

2009-09-08 Thread Joshua Murphy
On Tue, Sep 8, 2009 at 7:12 AM, Kaushal Shriyankaushalshri...@gmail.com wrote:
 Hi

 I am having issue with autossh host, I get

 autossh[13221]: checking for grace period, tries = 0
 autossh[13221]: starting ssh (count 1)
 autossh[13221]: ssh child pid is 13224
 autossh[13221]: check on child 13224
 autossh[13221]: set alarm for 600 secs
 autossh[13224]: execing /usr/bin/ssh

 My Autossh setting in my .bashrc are as  below

 export AUTOSSH_GATETIME=0
 export AUTOSSH_POLL=100
 export AUTOSSH_PORT=20020
 export AUTOSSH_DEBUG=1

 When i test by disconnecting and reconnecting the internet, It takes
 10mins to prompt for a password. Can this time interval be reduced ?

 Thanks and Regards,

 Kaushal

Where are you starting autossh from? The AUTOSSH_POLL variable in your
.bashrc is, it would appear, being disregarded in whatever context
autossh is starting in, otherwise you'd be seeing an up to 1 minute,
40 second delay on reconnecting, not 10 minutes.

-- 
Poison [BLX]
Joshua M. Murphy