[gentoo-user] Re: /etc/init.d/net.lo lots of output ..ack
darren kirby <[EMAIL PROTECTED]> writes: > > As best I can tell, what is happening here is that the net.lo script > checks all the "modules" in /lib/rcscripts/net.modules.d. These > scripts are all the different ways you can get a net connection, and > the one used in any particular instance is decided by > /etc/conf.d/net (again...as best as I can tell). In your case, it > would seem the net.lo script is trying _all_ of them. > > So: are you absolutely sure you net conf file is written properly? root # egrep -v '^(#|$)' /etc/conf.d/net config_eth1=( "192.168.0.4 netmask 255.255.255.0 brd 192.168.0.255" ) routes_eth1=( "default gw 192.168.0.20" ) Those are the correct parameters, and the ones that have worked for mnths although the format changed a few updates back. So I think those settings are not the problem >> It is preventing most services from starting by way of the normal >> channels although they can be started without problems by hand and >> using the flags found in /etc/conf.d. > > Can you elaborate here? Do you mean that if you try: > > /etc/init.d/ntpd start > > it fails but if you use: > > /etc/init.d/net.eth1 start > /etc/init.d/ntpd start > > it works? No > It is preventing most services from starting > by way of the normal channels `It' being the cause of the blob of output I posted. `Normal channels' being the init scripts like happens on bootup or when root calls /etc/init.d/NAME start/stop/status Those methods fail after invoking the blob of ouput. > although they can be started without problems by hand and using the > flags found in /etc/conf.d. `by hand' being: If root looks up the appropriate flags found in /etc/conf.d/NAME, and then starts NAME with: # NAME $AppropriateFlags It works like: # ntpd -u ntp:ntp & ntpd starts and runs normally # sendmail -bd -q30m -L sm-mta # sendmail -Ac -q30m -L sm-cm Sendmail starts and runs fine No crazy output. > Do you have a net connection when you try this? What is the status > of eth0? I am wondering why it tries to start eth1 here instead of > eth0... The ones listed above yes, but only because I ifconfiged one up. The normal bootup call to init scripts failed. > If eth0 is already up, eth0 isn't a player in my working network for now although I do use it occasionally. I have 2 nics, only one in use. It happens to be seen as eth1 so that is what I use in /etc/conf.d/net > and a net connection is present then ntpd should be > satisfied, and not try to run another net.* script. I'm not sure what you are talking about here. As I stated, the bootup init calls failed. I've shown ntpd output as a matter of example but only after having built the network by hand with ifconfig and route. Not by `/etc/init.d/NAME start'. (Again, that fails) -- gentoo-user@gentoo.org mailing list
[gentoo-user] Re: /etc/init.d/net.lo lots of output ..ack
darren kirby <[EMAIL PROTECTED]> writes: > Apropos, does anyone know of any good documentation about the Gentoo > boot process and initscripts? Looking through all of these, it is > difficult to follow what is going on, and the initscript guide I > linked to before is a bit terse. My sentiments too. I wasn't even able to see where all that guff got loaded or sourced looking thru net.lo. I'm not a programmer by no means but have written dozens even hundreds, I suppose, of shell scripts and perl scripts though I've had no training on either. However I get lost write away trying to follow how it all happens. Here is an example from /etc/init.d/gpm below. It is not apparent where any of those variables get filled with a value. I see nothing being sourced either. Further, what scripting language uses: ebegin eend I've never seen it in sh ksh bash. The three most common scripting languages (I think). What is it? checkconfig() { if [ -z "$MOUSEDEV" ] || [ -z "$MOUSE" ] ; then eerror "You need to setup MOUSEDEV and MOUSE in /etc/conf.d/gpm first" return 1 fi } start() { checkconfig || return 1 local params="" [ -n "$RESPONSIVENESS" ] && params="$params -r $RESPONSIVENESS" [ -n "$REPEAT_TYPE" ]&& params="$params -R$REPEAT_TYPE" [ -n "$APPEND" ] && params="$params $APPEND " ebegin "Starting gpm" start-stop-daemon --start --quiet --exec /usr/sbin/gpm \ -- -m ${MOUSEDEV} -t ${MOUSE} ${params} eend ${?} -- gentoo-user@gentoo.org mailing list
[gentoo-user] Re: /etc/init.d/net.lo lots of output ..ack
Richard Fish <[EMAIL PROTECTED]> writes: > A few things: > > 1. Run "equery check baselayout". If it reports anything wrong in > /lib/rcscripts, re-merge it. equery did show a herd of wrong mtimes. Which I'm guessing is probably normal but it also shows MAKEDEV missing. So I re-emerged it. Following re-emerge, equery now shows: root # equery check baselayout 2>&1|tee file2 !!! /etc/rc.conf has incorrect md5sum !!! /etc/gentoo-release has wrong mtime (is 1135082266, should be 1135082250) !!! /etc/conf.d/hostname has incorrect md5sum !!! /etc/modules.autoload.d/kernel-2.6 has incorrect md5sum !!! /etc/conf.d/clock has incorrect md5sum !!! /etc/conf.d/domainname has incorrect md5sum sys-apps/baselayout-1.12.0_pre11-r3: * 153 out of 159 files good However, it didn't help the init script problem a bit. I still see the long list of stuff and a failure trying to start stuff with: /etc/init.d/NAME start > 2. Make sure that net.eth1 is a symlink to net.lo, _not_ a copy of an > old script. Bingo...! It was not a symlink and was massively different. Checking backups from previous running system (before recent full reinstall) I see net.eth0 and net.eth1 both symlinked to net.lo. So renamed the current net.eth1 and symlinked a net.eth1 to net.lo. Starting services now works as expected. Thank you Mr. Fish, I'd probably never have figured this out from looking at the init process or the scripts. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: /etc/init.d/net.lo lots of output ..ack
quoth the [EMAIL PROTECTED]: > root # egrep -v '^(#|$)' /etc/conf.d/net > config_eth1=( "192.168.0.4 netmask 255.255.255.0 brd 192.168.0.255" ) > routes_eth1=( "default gw 192.168.0.20" ) > > Those are the correct parameters, and the ones that have worked for > mnths although the format changed a few updates back. So I think > those settings are not the problem Fair enough... > >> It is preventing most services from starting by way of the normal > >> channels although they can be started without problems by hand and > >> using the flags found in /etc/conf.d. > > > > Can you elaborate here? Do you mean that if you try: > > > > /etc/init.d/ntpd start > > > > it fails but if you use: > > > > /etc/init.d/net.eth1 start > > /etc/init.d/ntpd start > > > > it works? > > No > > > It is preventing most services from starting > > by way of the normal channels > > `It' being the cause of the blob of output I posted. > > `Normal channels' being the init scripts like happens on bootup or when > root calls /etc/init.d/NAME start/stop/status > > Those methods fail after invoking the blob of ouput. > > > although they can be started without problems by hand and using the > > flags found in /etc/conf.d. > > `by hand' being: > > If root looks up the appropriate flags found in /etc/conf.d/NAME, and > then starts NAME with: > > # NAME $AppropriateFlags > > It works like: > # ntpd -u ntp:ntp & > ntpd starts and runs normally > > # sendmail -bd -q30m -L sm-mta > # sendmail -Ac -q30m -L sm-cm > Sendmail starts and runs fine > > No crazy output. Ok, are _all_ your init scripts failing here, or just ones that depend on network? Obviously, if you are resorting to starting your network 'by hand' then gentoo is not going to know internally that the network is up and running, and hence try to start networking for those services that depend on it... > > Do you have a net connection when you try this? What is the status > > of eth0? I am wondering why it tries to start eth1 here instead of > > eth0... > > The ones listed above yes, but only because I ifconfiged one up. The > normal bootup call to init scripts failed. > > > If eth0 is already up, > > eth0 isn't a player in my working network for now although I do use it > occasionally. I have 2 nics, only one in use. It happens to be seen > as eth1 so that is what I use in /etc/conf.d/net > > > and a net connection is present then ntpd should be > > satisfied, and not try to run another net.* script. > I'm not sure what you are talking about here. Well, in your OP you can see that the ntpd init script is trying to start up your network (net.eth1) because ntpd depends on it to run. It cannot know (well, it can, but is not set up that way...) that your network is already running, because you started it outside of the normal channels (your term). > As I stated, the bootup > init calls failed. I've shown ntpd output as a matter of example but > only after having built the network by hand with ifconfig and route. > Not by `/etc/init.d/NAME start'. (Again, that fails) I do not know what to tell you at this point other than it seems your init scripts, or perhaps /sbin/runscript is totally borked. If you are a hands on sort of guy, you may want to see the init script guide: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4 the second last section "writing initscripts" goes intop details of how they run, perhaps it can help you to walk through your scripts and figure out where the problem lies. If not, you might need to file a bug report, or talk to a gentoo dev... -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972 pgp1QWGbRnp73.pgp Description: PGP signature
Re: [gentoo-user] Re: /etc/init.d/net.lo lots of output ..ack
On 12/19/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > As best I can tell, what is happening here is that the net.lo script > > checks all the "modules" in /lib/rcscripts/net.modules.d. These > > scripts are all the different ways you can get a net connection, and > > the one used in any particular instance is decided by > > /etc/conf.d/net (again...as best as I can tell). In your case, it > > would seem the net.lo script is trying _all_ of them. > > > > So: are you absolutely sure you net conf file is written properly? > > root # egrep -v '^(#|$)' /etc/conf.d/net > config_eth1=( "192.168.0.4 netmask 255.255.255.0 brd 192.168.0.255" ) > routes_eth1=( "default gw 192.168.0.20" ) A few things: 1. Run "equery check baselayout". If it reports anything wrong in /lib/rcscripts, re-merge it. 2. Make sure that net.eth1 is a symlink to net.lo, _not_ a copy of an old script. 3. You can set RC_NET_STRICT_CHECKING=lo in /etc/conf.d/rc to have the net dependancy satisified by net.lo, which will stop all other network services from trying to start net.eth1. -Richard -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: /etc/init.d/net.lo lots of output ..ack
quoth the Richard Fish: > A few things: > > 1. Run "equery check baselayout". If it reports anything wrong in > /lib/rcscripts, re-merge it. > > 2. Make sure that net.eth1 is a symlink to net.lo, _not_ a copy of an > old script. > > 3. You can set RC_NET_STRICT_CHECKING=lo in /etc/conf.d/rc to have the > net dependancy satisified by net.lo, which will stop all other network > services from trying to start net.eth1. > > -Richard Good tips Richard, thanks Apropos, does anyone know of any good documentation about the Gentoo boot process and initscripts? Looking through all of these, it is difficult to follow what is going on, and the initscript guide I linked to before is a bit terse. -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972 pgpIrUgIxzvHB.pgp Description: PGP signature
Re: [gentoo-user] Re: /etc/init.d/net.lo lots of output ..ack
On 12/20/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Here is an example from /etc/init.d/gpm below. It is not apparent > where any of those variables get filled with a value. I see nothing > being sourced either. Further, what scripting language uses: > ebegin > eend A major feature of every language worth knowing is the ability to write functions. ebegin and eend are exactly that, functions (or procedures if you like) written in bash. In the case of ebegin/eend, these are defined in /etc/init.d/functions.sh. All of the init scripts are executed by /sbin/runscript (see the first line of gpm). Now, this is where you would need to look at the source for baselayout, since /sbin/runscript is a binary executable, but the only thing that you really need to know is that /sbin/runscript runs /sbin/runscript.sh, which is just a bash script. It is this script which sources functions.sh and takes care of starting (via svc_start()) or stopping (via svc_stop()) the init script. I'm not sure what else /sbin/runscript does, as I haven't looked at the source for that. -Richard -- gentoo-user@gentoo.org mailing list