Issue in ifplugd?
Denys Vlasenko
vda.linux at googlemail.com
Sun Jan 9 19:25:25 UTC 2011
On Saturday 08 January 2011 10:24, Sameer Naik wrote:
> Hi,
>
> I just configured the busybox-1.15.2 applet ifplugd to monitor the
> "eth0" interface and call "ifup eth0" when the interface link comes up
> and call "ifdown eth0" when the interface link goes down. My
> /etc/ifplugd/ifplugd.action script looks like this.
>
> -- /etc/ifplugd/ifplugd.action
> #/bin/sh
>
> echo "link of interface ${1} is ${2}" > /tmp/ifplugd.log
>
> if [ "${2}" == "up" ]; then
> ifup ${1}
> else
> ifdown ${1}
> fi
>
> -- EOF
>
> What i am seeing is that when the link comes up the ifup command is
> called and when the link goes down the ifdown command is called. But
> once the ifdown command gets called, ifplugd will no longer be able to
> detect if the link has come up.
>
> To confirm this i removed the else block from the action script and i
> ifplugd will report the link status whenever is comes up or goes down.
> If i call ifdown eth0 manually, then again ifplugd will stop reporting
> the link status.
What is your network card?
Which detection mode is in use for your interface?
Look for this message in the log:
ifplugd(eth0): using FOO detection mode
If it is in IFF_RUNNING detection mode, "downed" interface
is always seen as unplugged.
--
vda
More information about the busybox
mailing list