#!/bin/sh

#for pptp remote dialin user using netbios name
local str=$(ifconfig | grep "ppp[3-7][0-9]" | awk '{printf"%s ",$1}')
killall udp-broadcast-relay

sleep 5

if [ "$str" == "" ]; then
	logger "udp-broadcast-relay not start: can't find interface ..."
else
	lan_ifname=$(uci -P /var/state -q get network.lan.ifname)
	logger "udp-broadcast-relay 1 137 $lan_ifname $str"
	/usr/sbin/udp-broadcast-relay -f 1 137 $lan_ifname $str
fi