ifplugd sometimes (mostly) cannot start /etc/init.d/net.eth0, even when the net-cable is already plugged in during the boot. In syslog there are repeated messages (5x): > lis 13 11:59:59 [rc-scripts] Could not get dependency info for "net.eth0"! > lis 13 11:59:59 [rc-scripts] Please run: > lis 13 11:59:59 [rc-scripts] # /sbin/depscan.sh > lis 13 11:59:59 [rc-scripts] to fix this. It doesn't help to run /sbin/depscan.sh. ifplugd uses a script /usr/sbin/ifplugd.action which calls /etc/init.d/net.eth0 start/stop according to the situation (cabel plugged/unplugged). Starting and stopping net.eth0 manually works of course. If I try to run this script (/usr/sbin/ifplugd.action) manually from the shell in the same way as ifplugd does, everything works as expected as well, without any messages in syslog. It also works when ifplugd is new-emerged on the system and restarted manually. Although I always get these messages, sometimes the eth0 iface is configured correctly, but mostly it isn't. Additional notes: - I tried reemerging the baselayout package as well. No change. - I tried both the stable ifplugd-0.13-r1 and 0.15. - Plugging and unplugging the network cable during run has the same effect, of course. - I use the latest stable sys-apps/baselayout: 1.8.6.10-r1 Reproducible: Always Steps to Reproduce: 1.emerge ifplugd 2. rc-update add ifplugd default 3. rc-update del net.eth0 default 4. reboot Actual Results: eth0 not configured (mostly, sometimes it IS OK!). /var/log/everything/current (metalog) says (ALWAYS!): Nov 13 20:19:42 [rc-scripts] Could not get dependency info for "net.eth0"! Nov 13 20:19:42 [rc-scripts] Please run: Nov 13 20:19:42 [rc-scripts] # /sbin/depscan.sh Nov 13 20:19:42 [rc-scripts] to fix this. Nov 13 20:19:42 [rc-scripts] Could not get dependency info for "net.eth0"! Nov 13 20:19:42 [rc-scripts] Please run: Nov 13 20:19:42 [rc-scripts] # /sbin/depscan.sh Nov 13 20:19:42 [rc-scripts] to fix this. Nov 13 20:19:42 [rc-scripts] Could not get dependency info for "net.eth0"! Nov 13 20:19:42 [rc-scripts] Please run: Nov 13 20:19:42 [rc-scripts] # /sbin/depscan.sh Nov 13 20:19:42 [rc-scripts] to fix this. Nov 13 20:19:42 [rc-scripts] Could not get dependency info for "net.eth0"! Nov 13 20:19:42 [rc-scripts] Please run: Nov 13 20:19:42 [rc-scripts] # /sbin/depscan.sh Nov 13 20:19:42 [rc-scripts] to fix this. Nov 13 20:19:42 [rc-scripts] Could not get dependency info for "net.eth0"! Nov 13 20:19:42 [rc-scripts] Please run: Nov 13 20:19:42 [rc-scripts] # /sbin/depscan.sh Nov 13 20:19:42 [rc-scripts] to fix this. Expected Results: eth0 configured. no errors in system logs.
try run #depscan.sh
*** Bug 33419 has been marked as a duplicate of this bug. ***
> It doesn't help to run /sbin/depscan.sh. If I wouldn't try this, I wouldn't report a bug ;-). I TRIED to run depscan.sh at least 100 times ;-). Wout Mertens suggested me to report it as a bug in initscripts. Ifplugd itself works as expected.
Thinking about this a bit more, it could be because some service is running that depends on the "net" service, and since net.eth0 is not an active service, it doesn't know about it. But it's still weird, because a similar setup works for me. Pavel, can you report the output of: $ ls /etc/runlevels/boot and $ ls /etc/runlevels/default ? For me, they give: boot:bootmisc checkroot consolefont keymaps modules rmnologin urandom checkfs clock hostname localmount net.lo serial metalog default:local netmount hotplug xdm fam sshd ifplugd xfs apmiser pcmcia apmd noflushd evms bootsplash maybe also attach a copy of /var/lib/init.d/deptree ?
I have to admit there are probably some weird things in my settings. (e.g. I cannot stop named often, just reload). However, there is no problem (as I have said) when doing the same thing manually (i.e. /etc/init.d/net.eth0 start/stop/restart or even ifplugd.action eth0 up/down) - I suppose ifplugd doesn't do anything else than the same thing ... does it? Well... # ls /etc/runlevels/boot/ alsasound clock hostname checkfs keymaps modules rmnologin urandom bootmisc consolefont hotplug checkroot localmount net.lo serial # ls /etc/runlevels/default/ acpid apache2 cupsd ifplugd iptables local named netmount ntp-client pcmcia postfix vcron xdm xfs I'll try to add the deptree as an attachment to the bug now...
Created attachment 20787 [details] list of /var/lib/init.d/deptree
Very strange. I'm now seeing the same symptoms. The weird thing is that the interface is brought up and down, regardless... So the error message is not important? Hmmm....
No, it isn't. I installed the ifplugd v0.20 and rebooted twice since the time. eth0 was configured in both cases, but there are still error messages in the log.
I get exactily the same error messages in the log file. I use ifplugd 0.15 on a system with kernel 2.6-test8 (but the same problem occours when I boot a 2.4.21 kernel). My net.eth0 is NOT brought up. After restarting it manually after the boot process, it comes up without problems... ls /etc/runlevels/boot gives alsasound checkfs clock hostname localmount net.lo serial bootmisc checkroot consolefont keymaps modules rmnologin urandom ls /etc/runlevels/default gives acpid ifplugd netmount sysklogd xdm cupsd local postgresql_nonet vcron xfs (postresql_nonet is a home cooked script that starts postgresql without insisting on configuring a network interface as gentoo's standard postgresql script does - or at least did, I didn't check it out for some time.) If I can help in fixing it by providing further information, just let me know.
I also receive these same error messages with ifplugd 0.20. Nothing happens to my interface when I plug and unplug the cable, either. Something is fishy. It reads to me like a strange PATH error - init scripts often have these sorts of problems when the PATH gets munged somewhere along the way, in my experience.
I think I have an explanation. net.eth0 is started from ifplugd.action. Since ifplugd.action is started by ifplugd, and ifplugd is started by /etc/init.d/ifplugd, environment variables that are used to avoid regenerating dependencies tree are set. But the dependency tree is inherited from ifplugd, and is invalid for net.eth0! Hence error message. I added the following lines in /usr/sbin/ifplugd.action: export RC_GOT_FUNCTIONS="no" export RC_GOT_SERVICES="no" export RC_GOT_DEPTREE_INFO="no" export RC_GOT_DAEMON="no" before starting net.eth0, and this nasty error message is now gone. However, this is a dirty hack, which only demonstrate where the problem is, and not a real solution.
Andrey, good catch! Ok, the proper solution would be to unset those variables before any ebuild start and stop functions are called. Azarah, what do you think?
I don't know what the status of this bug is, but I just emerged ifplugd today to check it out, and it exhibits exactly the same behaviour for me as in the initial bug report. I guess I'll use the dirty hack to get it working.
*** Bug 33479 has been marked as a duplicate of this bug. ***
is this still an issue wiht ifplugd-0.25 ?
It seems to work well for me, maybe it is working properly for a long time. It worked despite the complaints since v0.20. I haven't been looking for warnings/error messages in logs since that time. And there were many updates to baselayout lately.
Is this still an issue with baselayout-1.11.6-r1 and ifplug-0.25 ? If not, we can close this bug
Marking this WORKSFORME as it's been working for me for ages ... Feel free to reopen if anyone still has this problem