Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Todor Colov
> Sent: Montag, 20. Juli 2020 21:19
> To: openwrt-devel@lists.openwrt.org
> Cc: Todor Colov <todorco...@abv.bg>
> Subject: [PATCH 1/1] update factory reset for generic handling of all type of
> devices(jffs2, ubi, etc)

Despite the formal requirements not met (commit title/message), one comment 
below.

> 
> Signed-off-by: Todor Colov <todorco...@abv.bg>
> ---
>  package/base-files/files/etc/rc.button/reset | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/base-files/files/etc/rc.button/reset b/package/base-
> files/files/etc/rc.button/reset
> index 2403122ad2..0c11bfe462 100755
> --- a/package/base-files/files/etc/rc.button/reset
> +++ b/package/base-files/files/etc/rc.button/reset
> @@ -23,7 +23,7 @@ released)
>       elif [ "$SEEN" -ge 5 -a -n "$OVERLAY" ]
>       then
>               echo "FACTORY RESET" > /dev/console
> -             jffs2reset -y && reboot &
> +             rm -f /etc/config/* && cp -a /rom/etc/* /etc/. ; sync ; reboot

As far as I understand it, jffs2reset will really reset the file system, just 
throwing away all diffs to the "rom". What you do here looks to me like it will 
essentially remove the files, and then recreate them, both increasing the diff 
between the overlay fs and the rom part, eating up precious space.
Or is this healed somewhere magically I'm not aware of?

Best

Adrian

>       fi
>  ;;
>  esac
> --
> 2.27.0
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Attachment: openpgp-digital-signature.asc
Description: PGP signature

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

Reply via email to