Hi
I can confirm, that this patch is also needed for edimax 3g-6200n
(rt3050f). I was also having problems with not working failsafe on
this router. After applying this patch, and adding board name 3g-6200n
to section where  wl-351 is defined, failsafe works :).

2012/7/29 Сергей Василюгин <[email protected]>:
> Failsafe netlogon seems to be broken. telnetd starts but network is not 
> unconfigured. Console login works.
> I define ramips_failsafe function with known hardcoded network configs and 
> add it into failesafe_hook list. Checked for rt305x (dir300b1 & dir620a1).
>
> P.S. I think that other target has the same problem?
>
> Signed-off-by: Serge Vasilugin <vasilugin at yandex.ru>
>
>
> Index: target/linux/ramips/base-files/lib/ramips.sh
> ===================================================================
> --- target/linux/ramips/base-files/lib/ramips.sh        (revision 32760)
> +++ target/linux/ramips/base-files/lib/ramips.sh        (working copy)
> @@ -174,3 +174,49 @@
>
>         echo $name
>  }
> +
> +ramips_failsafe()
> +{
> +       local board
> +
> +       board=$(ramips_board_name)
> +       # ramips rt305x  switch driver hardcoded lan=eth0.1 & wan=eth0.2 so 
> ignore fs_failsafe_ifname
> +       # but just for case some additional
> +       case "$board" in
> +       wli-tx4-ag300n)
> +               ifconfig eth0 ${fs_failsafe_ip:-192.168.1.1} netmask 
> ${fs_failsafe_mask:-255.255.255.0} up
> +               ;;
> +
> +       v11st-fe | \
> +       rt-n56u | \
> +       rt-n15 | \
> +       wl-351)
> +               # devices with supported switch may work if hardcoded too. 
> need check!
> +               vconfig add eth0 1
> +               ifconfig eth0.1 ${fs_failsafe_ip:-192.168.1.1} netmask 
> ${fs_failsafe_mask:-255.255.255.0}
> +               ifconfig eth0 up
> +               ifconfig eth0.1 up
> +               ;;
> +
> +       freestation5 | \
> +       wcr-150gn)
> +               #  devices with lan=eth0.2
> +               vconfig add eth0 2
> +               ifconfig eth0.2 ${fs_failsafe_ip:-192.168.1.1} netmask 
> ${fs_failsafe_mask:-255.255.255.0}
> +               ifconfig eth0 up
> +               ifconfig eth0.2 up
> +               ;;
> +
> +       *)
> +               RT3X5X=`cat /proc/cpuinfo | grep RT3.5`
> +               if [ -n "${RT3X5X}" ]; then
> +                       vconfig add eth0 1
> +                       ifconfig eth0.1 ${fs_failsafe_ip:-192.168.1.1} 
> netmask ${fs_failsafe_mask:-255.255.255.0}
> +                       ifconfig eth0 up
> +                       ifconfig eth0.1 up
> +               else
> +                       ifconfig eth0 ${fs_failsafe_ip:-192.168.1.1} netmask 
> ${fs_failsafe_mask:-255.255.255.0} up
> +               fi
> +               ;;
> +       esac
> +}
> Index: target/linux/ramips/base-files/lib/preinit/03_preinit_do_ramips.sh
> ===================================================================
> --- target/linux/ramips/base-files/lib/preinit/03_preinit_do_ramips.sh  
> (revision 32760)
> +++ target/linux/ramips/base-files/lib/preinit/03_preinit_do_ramips.sh  
> (working copy)
> @@ -5,3 +5,4 @@
>  }
>
>  boot_hook_add preinit_main do_ramips
> +boot_hook_add failsafe ramips_failsafe
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to