dropbear and inittab

Frank Meerkoetter frank at betaversion.net
Tue Oct 19 01:51:15 WST 2004


On Mon, Oct 18, 2004 at 12:54:51PM +0800, Matt Johnston wrote:
> On Sun, Oct 17, 2004 at 10:52:42PM +0200, Frank Meerkoetter wrote:
> > Hi,
> > 
> > i would like to have dropbear restarted by init whenever 
> > the server terminates. To implement this i've added
> > the following line to my /etc/inittab:
> > 
> > SS:2345:respawn:/home/frank/dropbear-0.43/dropbear -p 9999\
> > -r /tmp/rsa-test
> > 
> > mandark:/home/frank/dropbear-0.43# ps xauw | grep dropb
> > root     13305  0.0  0.1  1868  572 ?        Ss   22:43   0:00
> > /home/frank/dropbear-0.43/dropbear -p 9999 -r /tmp/rsa
> > 
> > Dropbear is running and i can login, but still there is a problem.
> > Init thinks that dropbear has terminated and tries to respawn it.
> > But because dropbear is already running we're not able to bind to port 
> > 9999 and terminate. Successive attempts fail in the same way. In the 
> > end init gives up.
> 
> This is probably because Dropbear daemonises on startup - it
> forks so that it isn't associated with the terminal/session
> which launched it. If you run Dropbear with the -F flag, it
> shouldn't fork. Does that work?

Yes it does. Thanks for your help.

Frank



More information about the Dropbear mailing list