netware5
Very Senior Member
Sorry that I didn't reported in this thread about the final solution. Here is the solution:I also face very similar issues, but I have an additonal impact.
I have a home linux box also serving as a server for other computers. I intend to only suspend this linux box with wake on lan for unicast messages only.
These IGMP messages unfortunately wake up the server in some seconds. That is crazily energy consuming...
My wan-event script:
Code:
#!/bin/sh
# v384.15 Introduced wan-event script, (wan-start will be deprecated in a future release.)
# wan-event {0 | 1} {stopping | stopped | disconnected | init | connecting | connected}
#
Say(){
echo -e $$ $@ | logger -st "($(basename $0))"
}
SayT(){
echo -e $$ $@ | logger -t "($(basename $0))"
}
#========================================================================================================================================
#Say "User wan-event running"
scr_name="$(basename $0)"
WAN_IF=0
WAN_STATE=connected
# Call appropriate script based on script_type
SERVICE_SCRIPT_NAME="wan${WAN_IF}-$WAN_STATE"
SERVICE_SCRIPT_LOG="/tmp/WAN${WAN_IF}_state"
# Execute and log script state
if [[ -f "/jffs/scripts/$SERVICE_SCRIPT_NAME" ]] ; then
Say " Script executing.. for wan-event: "$SERVICE_SCRIPT_NAME
echo "$SERVICE_SCRIPT_NAME" > $SERVICE_SCRIPT_LOG
sh /jffs/scripts/$SERVICE_SCRIPT_NAME $*
else
Say " Script not defined for wan-event: "$SERVICE_SCRIPT_NAME
fi
##@Insert##
And my wan0-connected script:
Code:
#!/bin/sh
#Wait some time, so the mcpd can start
sleep 15
# Kill IGMP proxy daemon to stop flooding the LAN
killall -q -9 mcpd #Added by Pendgy
The key change made it successful is adding the "sleep 15" line in wan0-connected script. Now everything is fine, mcpd is permanently killed and no flood anymore. So I marked the thread as SOLVED.