I created a script in /etc/local.d that starts busybox ifplugd.
ifplugd is started at boot but after some seconds it stops.
If i run the script from command line it works like it is expected.
There is something i'm missing?
Thanks
Without a log of some sorts you won't see what is going on, so that is necessary, however first thing for you to try is to introduce a delay in the script, sleep 5 or something, maybe the drivers for the network aren't loaded yet.
Already done....
this is the script i adapted from the busybox source
#!/bin/bash
sleep 10
if="eth0"
if [[ ! -z `find /sys/class/net -name "$if"` ]]; then
if [ -f "/etc/network/interfaces" ]; then
/usr/bin/ifup -a
else
ip link set eth0 up
logger "Starting ifplugd on $if"
exec \
env - PATH="$PATH" \
/usr/bin/busybox softlimit \
/usr/bin/busybox setuidgid root \
/usr/bin/ifplugd -aqlMns -t3 -u8 -d8 -i "$if" -r "/etc/network/ifplugd_handler"
fi
fi
i will try to remove the ns flag from the command to see if ifplugd inserts some log.
Solved...
i removed
exec \
env - PATH="$PATH" \
/usr/bin/busybox softlimit \
/usr/bin/busybox setuidgid root \
from the script and now it works like expected...
i assumed that all that stuff was necessary, but i considered its meaning and i decided to cut it off, and this worked :)
anyway no log from ifplugd, also removing the s option ;)
Oh, and I was about to say that more of that script was unnecessary and could've caused more conflicts, like also the ifup/ip link parts, but glad you solved it.