luci/modules/luci-mod-admin-full/luasrc/controller/admin
Florian Eckert da4fab0462 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: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07 20:36:40 +08:00
..
filebrowser.lua Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
index.lua luci-mod-admin-full: do not access dispatcher.context.urltoken in logout 2015-10-21 16:43:07 +02:00
network.lua luci-mod-admin-full: dispatch SimpleForm models using the form() action 2018-04-06 12:10:16 +02:00
status.lua luci-mod-admin-full: dispatch SimpleForm models using the form() action 2018-04-06 12:10:16 +02:00
system.lua luci-mod-admin-full: change supports_reset() test for factory reset 2018-05-07 20:36:40 +08:00
uci.lua luci-mod-admin-full: fix request path access in uci controller 2018-04-06 06:58:32 +02:00