summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-advanced-reboot/luasrc/controller
diff options
context:
space:
mode:
authorStan Grishin <stangri@melmac.net>2019-11-27 08:32:15 -0700
committerStan Grishin <stangri@melmac.net>2019-11-27 08:32:15 -0700
commit7483c1301227a7aec61d8bcd129e0edc8ec866b3 (patch)
treea95b4c1dc421e1aa9d3e7ef3d98802ed7e8b4032 /applications/luci-app-advanced-reboot/luasrc/controller
parent4a08fdd2d374083366787c4124e6b4de48bf7b77 (diff)
luci-app-advanced-reboot: better information for snapshots
Signed-off-by: Stan Grishin <stangri@melmac.net>
Diffstat (limited to 'applications/luci-app-advanced-reboot/luasrc/controller')
-rw-r--r--applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua b/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua
index 112ac8a0d4..6ed4c66149 100644
--- a/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua
+++ b/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua
@@ -37,12 +37,18 @@ function get_partition_os_info(op_ubi)
local cp_info, ap_info
if fs.access("/etc/os-release") then
cp_info = util.trim(util.exec('. /etc/os-release && echo "$PRETTY_NAME"'))
+ if cp_info:find("SNAPSHOT") then
+ cp_info = util.trim(util.exec('. /etc/os-release && echo "$OPENWRT_RELEASE"'))
+ end
end
logger(i18n.translate("attempting to mount alternative partition") .. " (mtd" .. tostring(op_ubi) .. ")")
alt_partition_unmount(op_ubi)
alt_partition_mount(op_ubi)
if fs.access("/alt/rom/etc/os-release") then
ap_info = util.trim(util.exec('. /alt/rom/etc/os-release && echo "$PRETTY_NAME"'))
+ if ap_info:find("SNAPSHOT") then
+ ap_info = util.trim(util.exec('. /alt/rom/etc/os-release && echo "$OPENWRT_RELEASE"'))
+ end
end
logger(i18n.translate("attempting to unmount alternative partition") .. " (mtd" .. tostring(op_ubi) .. ")")
alt_partition_unmount(op_ubi)