Hi Lee,

On Wed, Jan 18, 2012 at 01:22:10PM +0000, lee.es...@nowonline.co.uk wrote:
> The attached patch adds a "notify" script to the dsl_cpe_control app
> to bring the relevant pppoa interface up (or down) whenever there is
> a line status change.
> 
> As far as I can tell the existing hotplug mechanism doesn't work for
> non-br2684 based systems as there is no nas0 interface created, and
> hence no hotplug event ... so the ppp link stays down until you
> manually start it, people may be surviving by having an erroneous
> bridge configured (which seems to be the default), but clearly this
> isn't the right behaviour.
> 
> The patch largely replicates the code from the atm hotplug script
> (with the addition of support for the link going down.)

I did not test your patch yet but I think that regardles of the proto we should
do ifup/ifdown. For example I use dhcp...

+       if [ "$DSL_INTERFACE_STATUS" = "UP" ]; then
+               if [ "$proto" = "pppoa" ] && [ "$up" != 1 ] && [ "$auto" = 1 ]; 
then
+                       found=1
+                       ( sleep 1; ifup "$ifc" ) &
+               fi
+       else
+               if [ "$proto" = "pppoa" ] && [ "$up" = 1 ] && [ "$auto" = 1 ]; 
then
+                       found=1
+                       ( sleep 1; ifdown "$ifc" ) &
+               fi
+       fi
+done

This is the part of the patch I'm refering to. Please send your patches inline
in the future.

Regards,
Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to