Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74432 - "need net" ignores multiple interfaces
Summary: "need net" ignores multiple interfaces
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-14 15:49 UTC by Nick Pollitt
Modified: 2005-05-23 16:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Pollitt 2004-12-14 15:49:15 UTC
I have two ethernet interfaces started in the default runlevel, eth0 and eth1.  eth0 is my primary interface to the rest of the world, while eth1 goes to a private subnet of test machines.  If I stop the interface eth1 using:
/etc/init.d/net.eth1 stop
ALL of the services that "need net" stop, including but not limited to ypbind and sshd.  Meanwhile the gateway interface eth0 is still active and usable.  These services should not be stopped.

Reproducible: Always
Steps to Reproduce:
1. Configure two ethernet interfaces (eth0 and eth1)
2. Stop one interface
3. Observe all "need net" services stopping.

Actual Results:  
proclus init.d # ifconfig 
eth0      Link encap:Ethernet  HWaddr 00:01:6C:2F:45:C4 
          inet addr:10.0.4.46  Bcast:10.0.255.255  Mask:255.255.0.0 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
          RX packets:1163393 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:669083 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000 
          RX bytes:953912959 (909.7 Mb)  TX bytes:52349849 (49.9 Mb) 
          Interrupt:23 Base address:0xd000 
 
eth1      Link encap:Ethernet  HWaddr 00:A0:CC:5F:08:8C 
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
          RX packets:0 errors:2 dropped:0 overruns:0 frame:0 
          TX packets:113 errors:1 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:17902 (17.4 Kb) 
          Interrupt:21 Base address:0xa000 
 
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0 
          UP LOOPBACK RUNNING  MTU:16436  Metric:1 
          RX packets:379 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:379 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:0 
          RX bytes:31584 (30.8 Kb)  TX bytes:31584 (30.8 Kb) 
proclus init.d # /etc/init.d/net.eth1 stop 
 * Stopping apache2 ...                                                   
[ ok ] 
 * Stopping in.tftpd ...                                                  
[ ok ] 
 * Stopping ntpd ...                                                      
[ ok ] 
 * Stopping ypbind ... 
 * Stopping portmap ...                                                   
[ ok ] 
 * Stopping sshd ...                                                      
[ ok ] 
 * Stopping eth1 
 *    Bringing down eth1 
 *       Shutting down eth1 ...                                           
[ ok ] 
proclus init.d # 

Expected Results:  
proclus init.d # /etc/init.d/net.eth1 stop  
 * Stopping eth1  
 *    Bringing down eth1  
 *       Shutting down eth1 ...                                            
[ ok ]
Comment 1 SpanKY gentoo-dev 2004-12-14 17:23:58 UTC
what do you have in /etc/conf.d/rc ?

also, you neglected to provide `emerge info` like you were supposed to
Comment 2 Nick Pollitt 2004-12-15 09:26:36 UTC
proclus ~ # emerge info
Portage 2.0.51-r8 (default-linux/x86/2004.2, gcc-3.3.4, glibc-2.3.4.20041102-r0, 2.4.28 i686)
=================================================================
System uname: 2.4.28 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Oct 18 2004, 09:13:47)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r2, 1.6.3, 1.4_p6, 1.9.3, 1.7.9, 1.5
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r1
virtual/os-headers:  2.4.22
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium4 -msse -msse2 -mmmx "
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -msse -msse2 -mmmx "
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.ccccom.com ftp://gentoo.ccccom.com ftp://mirrors.tds.net/gentoo http://mirrors.tds.net/gentoo http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.osuosl.org/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib acl acpi aim alsa apm arts avi berkdb bitmap-fonts bonobo bzlib calendars canna cdr crypt cscope cups dio directfb divx4linux dvd dvdr encode esd ethereal f77 fam fbcon flac flash foomaticdb fortran gd gdbm gif gnome gphoto2 gpm gps gtk gtk2 gtkhtml imagemagick imlib innodb ipv6 java jikes jpeg junit kde lcms libg++ libwww mad mikmod ming mmap mmx motif mozilla mpeg mysql ncurses nis nls oggvorbis opengl pam pda pdflib perl png posix postgres python qt quicktime readline samba sdl slang snmp spell sse ssl svga tcpd tetex tiff truetype unicode usb wmf x86 xml xml2 xmms xv xvid zlib video_cards_i810"
proclus conf.d # cat rc
# /etc/conf.d/rc:
# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/conf.d/rc,v 1.20 2004/12/01 04:44:31 vapier Exp $

#
# Global config file for the Gentoo RC System
#

# This is the number of tty's used in most of the rc-scripts (like
# consolefont, numlock, etc ...)

RC_TTY_NUMBER=11

# Set to "yes" if you want the rc system to try and start services
# in parallel for a slight speed improvement.

RC_PARALLEL_STARTUP="no"

# RC_NET_STRICT_CHECKING allows some flexability with the 'net' service.
# The following values are allowed:
#  no    - This basically means that at least one net.* service besides net.lo
#          must be up.  This can be used by notebook users that have a wifi and
#          a static nic, and only wants one up at any given time to have the
#          'net' service seen as up.
#  lo    - This is the same as the 'no' option, but net.lo is also counted.
#          This should be useful to people that do not care about any specific
#          interface being up at boot.
#  yes   - For this ALL network interfaces MUST be up for the 'net' service to
#          be considered up.

RC_NET_STRICT_CHECKING="no"

# Use this variable to control the /dev management behavior.
#  auto   - let the scripts figure out what's best at boot
#  devfs  - use devfs (requires sys-fs/devfsd)
#  udev   - use udev (requires sys-fs/udev)
#  static - let the user manage static nodes

RC_DEVICES="auto"

# UDEV OPTION:
# Set to "yes" if you want to save /dev to a tarball on shutdown
# and restore it on startup.  This is useful if you have a lot of
# custom device nodes that udev does not handle/know about.

RC_DEVICE_TARBALL="yes"





#
# Controlling start-stop-daemon behavior
#
# NOTE: most of these are not in use yet!!
#

# Set to "yes" if stop-daemon() should always retry killing the
# service if it fails the first time.

RC_RETRY_KILL="yes"


# Set the amount of seconds stop-daemon() should wait between
# retries.  $RC_RETRY_KILL should be set to "yes".

RC_RETRY_TIMEOUT=1


# Set the amount of times stop-daemon() should try to kill
# a service before giving up.  $RC_RETRY_KILL should be set to "yes".

RC_RETRY_COUNT=5


# Set to "yes" if stop-daemon() should fail if the service
# is marked as started, but not actually running on stop.

RC_FAIL_ON_ZOMBIE="no"





#
# Internal configuration variables
#
# NB:  These are for advanced users, and you should really
#      know what you are doing before changing them!
#


# rc-scripts dep-cache directory
#
# NOTE:  Do not remove the next line, as its needed by the baselayout ebuild!
#
#  svcdir="/var/lib/init.d"

svcdir="/var/lib/init.d"


# Should we mount $svcdir in a ram disk for some speed increase
# for slower machines, or for the more extreme setups ?

svcmount="no"


# FS type that should be used for $svcdir.  Note that you need
# $svcmount above set to "yes" for this to work ...  Currently
# tmpfs, ramfs, and ramdisk are supported (tmpfs is the default).

svcfstype="tmpfs"


# Size of $svcdir in KB.  Note that ramfs doesn't support this
# due to kernel limitations.

svcsize=2048
Comment 3 SpanKY gentoo-dev 2004-12-15 10:39:44 UTC
for now, use 'pause' instead of 'stop'
Comment 4 Nick Pollitt 2005-03-12 15:15:24 UTC
Additional 'need net' suckage.

If I start my network interface(s) manually then use an init script that has 'need net' in it, then the script will restart my interfaces.  This is a real pain.  I have complex networking needs, and this 'need net' isn't going to figure itall out.

The real solution is to remove 'need net' from all init scripts.
Comment 5 SpanKY gentoo-dev 2005-05-21 00:38:45 UTC
can you update to baselayout-1.11.12-r1 and try again ?  the net depend stuff
has seen some updates since this bug was opened ...
Comment 6 Nick Pollitt 2005-05-23 12:33:23 UTC
I updated to 1.11.12-r1.  I am able to bring eth1 up and down without affecting
any running services, or eth0 (or other interfaces).
Comment 7 SpanKY gentoo-dev 2005-05-23 16:08:16 UTC
so that sounds like it's fixed