Skip to content
Commit da4fab04 authored by Florian Eckert's avatar Florian Eckert Committed by Yousong Zhou
Browse files

luci-mod-admin-full: change supports_reset() test for factory reset



The check "supports_reset" only covers /proc/mtd partitions. If we have
this the commands checks for names like ubi or rootfs_data. If this is
found the system is possible for a factory reset.  But on x86 the
situation is different.  We have no /proc/mtd partitions because this
system do not use a bare metall flash.

To solve this issue check if we have an overlay and if so we could do a
factory reset. This could be applied for system which uses bare metal
flash and system which uses FTL or harddisks.

Jffs2reset is the current command used for factory reset.  It will try
to find volume "rootfs_data" and if it's mounted will delete all files
under directory /overlay

luci-mod-admin-mini also has check for reset available, but we leave it
alone for now as it uses "mtd -r erase rootfs_data"

Signed-off-by: default avatarFlorian Eckert <fe@dev.tdt.de>
Signed-off-by: default avatarYousong Zhou <yszhou4tech@gmail.com>
parent 428eb63f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment