#!/bin/sh
# Copyright (c) 2013 The Linux Foundation. All rights reserved.

. /lib/functions.sh
. /lib/functions/network.sh

iface=$(uci get pppoe.relay.server)
[ -n "${iface}" -a ${INTERFACE} = ${iface} ] || return 0

case "$ACTION" in
	ifup)
		/etc/init.d/pppoe-relay restart
	;;
	ifdown)
		/etc/init.d/pppoe-relay stop
	;;
esac
