You are not logged in.

#1 2011-08-24 19:39:07

rolfijn
Member
Registered: 2010-02-05
Posts: 17

[SOLVED] Sshd daemon won't start as network interface is not ready

Dear list.

I run an Acer Aspire One A110 as a small homeserver. I connect it to the network through wifi. For this I have installed and configured wicd with a fixed ip-address. This works ok except for the sshd daemon that won't start after a reboot. I suspect that this is because the network interface isn't made ready by the wicd daemon and therefore sshd cannot connect to it/use it. If I log in and start the sshd daemon manually it works without a problem. For now I have solved it by disabeling sshd in the DAEMONS array in rc.conf and adding "sleep 15" and "/etc/rc.d/sshd start" to rc.local. This works fine, but I wonder if there is a more elegant(archy?) way. A way where I can keep the sshd daemon in DAEMONS in rc.conf to keep all the daemons in one place. Perhaps some delay mechanism, or have the sshd daemon wait for the network interface to be ready. Searching the forums and wiki has yielded no results.


Regards,
Rolf Deenen

Last edited by rolfijn (2011-08-29 19:42:11)

Offline

#2 2011-08-24 22:29:48

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: [SOLVED] Sshd daemon won't start as network interface is not ready

wicd has the ability to start and stop services depending upon connection state, you should use those.

#!/bin/sh

# Start daemons that rely on network connectivity

rc.d start ufw ntpd dropboxd transmissiond bitlbee sshd samba

is present and executable as a script in /etc/wicd/scripts/postconnect.  I turn the services off in /etc/wicd/scripts/predisconnect.


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#3 2011-08-29 19:41:42

rolfijn
Member
Registered: 2010-02-05
Posts: 17

Re: [SOLVED] Sshd daemon won't start as network interface is not ready

Been out of town for the weekend, so I reply a little late. Thank you, works like a charm. Doesn't keep the daemons that I want to start in one place, but does get rid of the delay because of the "sleep" command. Created a script "/etc/wicd/scripts/postconnect/startservices" containing the command "rc.d start sshd" and a script "/etc/wicd/scripts/predisconnect/stopservices" containing "rc.d stop sshd".

regards,
Rolf

Offline

Board footer

Powered by FluxBB