Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 95694 - net.eth0 fails to start with updated baselayout
Summary: net.eth0 fails to start with updated baselayout
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-10 08:19 UTC by Thorsten Kampe
Modified: 2005-07-21 23:57 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 Thorsten Kampe 2005-06-10 08:19:32 UTC
1. Updated to new baselayout 1.11.12-r4
2. did etc-update and update all files in /etc/init.d
3. restarted system

* Starting eth0
"/etc/init.d/net.eth0: line 114: find: command not found"

also multiple warnings "DO NOT USE EXIT IN INIT.D SCRIPTS" in /var/log/
everything/current

BUT: manually running net.eth0 works fine

Reproducible: Always
Steps to Reproduce:
see "Details"
Actual Results:  
No network connection anymore because eth0 is down

Expected Results:  
Start eth0

Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.
20041102-r1, 2.6.11-gentoo-r7 i686)
=================================================================
System uname: 2.6.11-gentoo-r7 i686 Pentium III (Katmai)
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May  3 2005, 23:20:25)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/
share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /
usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"                        
      CXXFLAGS="-O3 -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.inode.at"
LANG="en_US"
LINGUAS="de en en_GB pl"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://localhost/gentoo-portage"                                          
      USE="x86 kdeenablefinal pam readline samba usepackagedmakefiles linguas_de 
linguas_en linguas_en_GB linguas_pl userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Thorsten Kampe 2005-06-10 08:22:28 UTC
These are the repeating lines in /var/log/everything/current

[rc-scripts] DO NOT USE EXIT IN INIT.D SCRIPTS                         
[rc-scripts] This IS a bug, please fix your broken init.d
Comment 2 Thorsten Kampe 2005-06-10 08:34:55 UTC
The failing line in the rc script net.eth0 (actually symlinked to net.lo) is:

MODULES=( $( find ${MODULES_DIR}/ -maxdepth 1 -type f ! -name ".*" | sort ) )
Comment 3 SpanKY gentoo-dev 2005-06-10 10:58:57 UTC
sounds like you have net in your boot runlevel ...

can you post the output of:
rc-update -s | grep -v '| *$'
Comment 4 Thorsten Kampe 2005-06-10 11:33:42 UTC
Here it is:

            bootmisc | boot                          
             checkfs | boot                          
           checkroot | boot                          
               clock | boot                          
         consolefont | boot                          
          domainname |      default                  
            firewall |      default                  
              hdparm |      default                  
            hostname | boot                          
             keymaps | boot                          
                lisa |      default                  
               local |      default nonetwork        
          localmount | boot                          
             metalog |      default                  
             modules | boot                          
            net.eth0 |      default                  
              net.lo | boot                          
            netmount |      default                  
           rmnologin | boot                          
               samba |      default                  
              serial | boot                          
             urandom | boot                          
        vmware-tools |      default                  
              xinetd |      default      
Comment 5 Thorsten Kampe 2005-06-10 11:37:55 UTC
The installation is from November last year and has continously been updated 
since. I didn't move any services from the boot to the default runlevel (or vice 
versa).
Comment 6 SpanKY gentoo-dev 2005-06-10 11:47:28 UTC
do you have /usr on a sep partition from / ?

does /usr/bin/find exist ?
Comment 7 Thorsten Kampe 2005-06-10 12:05:53 UTC
I don't have any partitions - and find is in /usr/bin.

The net.eth0 script works fine when run manually after booting as root. I guess 
/usr/bin is not in the "rc script path".
Comment 8 Thorsten Kampe 2005-06-10 12:06:58 UTC
I skipped through the net.lo script and the only two other external programs I 
found were modprobe and sort. These were called by the full path (/sbin/modprobe 
and /bin/sort).

So maybe it's just as trivial as replacing "find" with "/usr/bin/find" in the 
script.
Comment 9 Aron Griffis (RETIRED) gentoo-dev 2005-06-10 13:09:23 UTC
This should already be handled by functions.sh, btw...

if [ -z "${EBUILD}" ]
then
    # Setup a basic $PATH.  Just add system default to existing.
    # This should solve both /sbin and /usr/sbin not present when
    # doing 'su -c foo', or for something like:  PATH= rcscript start
    PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:${PATH}"
...

Seems like "unset EBUILD" would be a good idea in runscript.sh, but that's
probably not the problem here.
Comment 10 SI Reasoning 2005-06-13 09:17:26 UTC
I have been very afraid to etc-update net.eth0 and net.lo with the
sys-apps/baselayout-1.11.12-r4 update. The update pretty much wipes out net.eth0
and replaces it with this header:
+
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/net.lo,v 1.10 2004/04/21
17:09:18 vapier Exp $

and then deals with nothing but net.lo as far as I can tell. Doing a glance at
both seems to lead me to think that the files got misnamed and that the net.eth0
in sys-apps/baselayout-1.11.12-r4 should actually be for net.lo and vice-versa.
Comment 11 SpanKY gentoo-dev 2005-06-13 10:45:13 UTC
baselayout should only have one net script, net.lo

all other interfaces need to be symlinks to that

/etc/init.d/net.lo
/etc/init.d/net.eth0 -> net.lo
Comment 12 Thorsten Kampe 2005-06-15 06:30:00 UTC
Okay, here is how I solved it myself:

1. I moved the net.eth0 service from the default to the boot runlevel. Can 
someone verify that this is the recommended runlevel for net.eth0?

2. I changed RC_PARALLEL_STARTUP from "yes" to "no" in /etc/conf.d/rc. Note that 
this configuration worked in the previous baselayout.
Comment 13 Thorsten Kampe 2005-06-15 07:05:23 UTC
Correction: 'I changed RC_PARALLEL_STARTUP from "yes" to "no"' - this is 
independent of the error.

Now I get an error saying "net.eth0: cannot start until the runlevel boot has 
completed" but after the boot runlevel is executed net.eth0 start without error
Comment 14 SpanKY gentoo-dev 2005-06-15 07:39:29 UTC
the only net script that is supposed to be in the boot runlevel is net.lo

if you try to put any other net script into the boot runlevel, the script will
detect that and issue an error (as you can see)
Comment 15 Thorsten Kampe 2005-06-15 07:54:58 UTC
Okay, so the right place for the net.eth0 symlink would be the default runlevel.

Anybody with an idea about why net.eth0 doesn't work in the default runlevel, 
but in the boot runlevel and when run manually?!
Comment 16 Roy Marples (RETIRED) gentoo-dev 2005-06-16 08:44:52 UTC
Is the error still "net.eth0: cannot start until the runlevel boot has 
completed"?

If so, what is the output of
rc-update -s | grep net.eth0

Can you also verify the status of net.eth0 immediately after booting?
/etc/init.d/net.eth0 status
Comment 17 Thorsten Kampe 2005-06-16 14:37:39 UTC
>Is the error still "net.eth0: cannot start until the runlevel boot has 
completed"?

Yes, sure. But this is "normal" because net.eth0 is now in the boot runlevel.
The error is no problem because actually net.eth0 is started at the end of the
boot runlevel.

> If so, what is the output of rc-update -s | grep net.eth0

> Can you also verify the status of net.eth0 immediately after booting?
/etc/init.d/net.eth0 status

I will do that when I have again access to the virtual machine (on Wednesday).

But please: the bug/problem is *NOT* the error message of net.eth0 in the boot
level (because it /does/ get started). The bug/problem is that net.eth0 doesn't
start at all in the default runlevel.
Comment 18 Roy Marples (RETIRED) gentoo-dev 2005-07-19 14:04:54 UTC
Please test baselayout-1.12.0_pre1-r1 - it should fix your issue

Re-open if not.
Comment 19 Thorsten Kampe 2005-07-20 06:11:14 UTC
Problem solved. Thanks to all who worked on it.

So what has actually been the cause of the problem? There's nothing about it in 
the Changelog...
Comment 20 Roy Marples (RETIRED) gentoo-dev 2005-07-21 23:57:10 UTC
You'll have to look waaaaay down as it was fixed in the dev branch months ago

Azarah fixed it on May 10th