In the default /etc/init.d/sshd script, it depends on "need net", and net.lo is not considered as a net ( I believe defined in the default /etc/conf.d/rc? ). So stopping net.eth* stops sshd, which I don't think is a correct behavior. Reproducible: Always Steps to Reproduce: 1. /etc/init.d/net.eth0 status, /etc/init.d/sshd status. Ensure net.eth* and sshd are Started 2. /etc/init.d/net.eth0 stop. This stops sshd before it stops net.eth0 3. /etc/init.d/sshd status, shows Stopped Actual Results: sshd is stopped when a net.eth* interface goes down. Expected Results: sshd should not be stopped when a net.eth* interface goes down. I find that commenting out the "need net" line in depend of the sshd init script fixes the behavior, though I am not sure if this is a proper fix.
Please post your "emerge --info".
(In reply to comment #1) > Please post your "emerge --info". > Below is my emerge --info. Regards. Portage 2.1.6.11 (default/linux/x86/2008.0, gcc-4.2.2, glibc-2.8_p20080602-r1, 2.6.29-tuxonice i686) ================================================================= System uname: Linux-2.6.29-tuxonice-i686-Intel-R-_Pentium-R-_M_processor_1.70GHz-with-glibc2.0 Timestamp of tree: Sat, 18 Apr 2009 04:00:01 +0000 ccache version 2.4 [disabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7-r1, 2.1.7 dev-lang/python: 2.5.2-r7 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.3-r1 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_GB.UTF-8" LC_ALL="en_GB.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en_GB" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/desktop-effects /usr/portage/local/layman/berkano /usr/portage/local/layman/java-overlay /usr/portage/local/layman/sunrise /usr/portage/local/layman/lisp /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl acpi alsa apache2 apm berkdb bitmap-fonts bzip2 cairo cjk cli cracklib crypt cups dbus dri dvd exif firefox flac fortran ftp gdbm gif glitz gpm gtk gtk2 hal iconv imlib ipv6 isdnlog java javascript jpeg midi mmx mmxext mp3 mpeg msn mtp mudflap mysql ncurses nls nptl nptlonly ogg openal opengl openmp pam pcre pdf perl php png pppd python quicktime readline reflection session spell spl sse sse2 ssl svg sysfs tcpd tiff truetype truetype-fonts type1-fonts unicode usb vim vim-syntax vorbis wifi x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev synaptics keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" USERLAND="GNU" VIDEO_CARDS="radeon" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
this is how the net stuff works. use pause/--nodeps if you dont want to kill dependent services.
I disagree on this. It makes it pretty easy to shoot yourself in the foot, and I don't see any benefit to having this. Since the default config for sshd is to listen on 0.0.0.0 it should work just fine without having net up. Also "need net" is a fixed dependency on net.eth0, apparently, so that sshd will get killed even if net.eth1 is still up (bug 436286). Presumably we could still use "after net" or "use net" to create a similar effect at boot time, without making things hard.
I also agree. sshd doesn't "need net", because it by default listens on 0.0.0.0, and this "need net" should be removed.
*** Bug 439100 has been marked as a duplicate of this bug. ***
Why is this bug resolved invalid? I have a machine that mounts nfs as the root filesystem and with the latest openrc (0.11.1), openssh, ntp-client, snmpd and syslog-ng don't start because of this problem. Is rc_lo_provide="net" going to be the permanent fix for openssh in this situation since this bug is invalid? rc default logging started at Wed Oct 24 15:23:42 2012 * ERROR: syslog-ng needs service(s) net * Starting acpid ... [ ok ] * Running cpufreq-set --governor ondemand ... [ ok ] * Starting D-BUS system messagebus ... [ ok ] * ERROR: ntp-client needs service(s) net * Starting ntpd ... [ ok ] * ERROR: snmpd needs service(s) net * ERROR: sshd needs service(s) net * Doing udev cleanups * Starting local [ ok ]
*** Bug 442564 has been marked as a duplicate of this bug. ***
Adding info from my bug report that was marked duplicate: SSH seems to be waiting for NetworkManager to start: # rc-service sshd start * WARNING: sshd is scheduled to start when NetworkManager has started This prevents user from starting such a critical service as SSH is unless also starting NetworkManager. This doesn't make any sense, as: 1) When NetworkManager is *not* running, the network connectivity can be acquired by other means, e.g. running dhclient by hand or using *ip* to configure networking. 2) When NetworkManager *is* running, that doesn't necessarily mean we have a global connectivity. Note that SSH can listen on wildcard addresses and therefore has no ordering problems with the network setup. Global connectivity is only a runtime dependency for SSH to be reachable via global address, not for SSH itself. SSH can also be used through link-local or even node-local address (aka localhost). OpenSSH 6.1_p1 NetworkManager 0.9.6.4 -- After uninstalling networkmanager, it works. But this is not really what one would want. -- For some reason, sshd won't start anyway and it looks like this: http://www.linuxquestions.org/questions/linux-networking-3/sshd-fatal-daemon-failed-no-such-device-279664/ This helped: rm /dev/null mknod /dev/null c 1 3 But I'm curious who and why in the hell would remove /dev/null and make it an ordinary file? -- Just one remark to the previous comment, the /dev/null ordinary file was there when udev is not running because of lack of CONFIG_DEVTMPFS.
*** Bug 449100 has been marked as a duplicate of this bug. ***
InCVS as of 6.1_p1-r1