diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2016-03-23 16:58:14 +0200 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2016-03-23 16:58:14 +0200 |
commit | 5b79e62c0a99bab8dfb8dce8124d9fecc11da54b (patch) | |
tree | 2e79eec429e99b7ebec042d6bc62cafdcbc1412c /modules/luci-mod-admin-full/luasrc | |
parent | 6b9a7433bc0fec8a84533b641f0608d90bcb39eb (diff) |
luci-mod-admin-full: Enable reset in Luci also for ubi
Enable reset in LuCI also for ubi based firmwares.
This closes #672
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/controller/admin/system.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua index d180da71b7..5b80f20783 100644 --- a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua +++ b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua @@ -190,7 +190,7 @@ local function supports_sysupgrade() end local function supports_reset() - return (os.execute([[grep -sq '"rootfs_data"' /proc/mtd]]) == 0) + return (os.execute([[grep -sqE '"rootfs_data"|"ubi"' /proc/mtd]]) == 0) end local function storage_size() @@ -351,7 +351,7 @@ function action_reset() addr = "192.168.1.1" }) - fork_exec("killall dropbear uhttpd; sleep 1; mtd -r erase rootfs_data") + fork_exec("sleep 1; killall dropbear uhttpd; sleep 1; jffs2reset -y && reboot") return end |