diff options
author | Florian Eckert <fe@dev.tdt.de> | 2019-11-28 07:24:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-28 07:24:41 +0100 |
commit | 58b3ef44daa558fa9b26687959be441fea821ec0 (patch) | |
tree | a95b4c1dc421e1aa9d3e7ef3d98802ed7e8b4032 /applications | |
parent | 4a08fdd2d374083366787c4124e6b4de48bf7b77 (diff) | |
parent | 7483c1301227a7aec61d8bcd129e0edc8ec866b3 (diff) |
Merge pull request #3366 from stangri/master-luci-app-advanced-reboot
luci-app-advanced-reboot: better information for snapshots
Diffstat (limited to 'applications')
-rw-r--r-- | applications/luci-app-advanced-reboot/Makefile | 2 | ||||
-rw-r--r-- | applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/applications/luci-app-advanced-reboot/Makefile b/applications/luci-app-advanced-reboot/Makefile index e3037df2f..97301fc6a 100644 --- a/applications/luci-app-advanced-reboot/Makefile +++ b/applications/luci-app-advanced-reboot/Makefile @@ -13,7 +13,7 @@ LUCI_DESCRIPTION:=Provides Web UI (found under System/Advanced Reboot) to reboot LUCI_DEPENDS:=+luci-compat +luci-mod-admin-full LUCI_PKGARCH:=all -PKG_RELEASE:=45 +PKG_RELEASE:=46 include ../../luci.mk 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 112ac8a0d..6ed4c6614 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) |