luci-app-advanced-reboot: better information for snapshots
Signed-off-by: Stan Grishin <stangri@melmac.net>
This commit is contained in:
parent
4a08fdd2d3
commit
7483c13012
2 changed files with 7 additions and 1 deletions
|
@ -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_DEPENDS:=+luci-compat +luci-mod-admin-full
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
PKG_RELEASE:=45
|
PKG_RELEASE:=46
|
||||||
|
|
||||||
include ../../luci.mk
|
include ../../luci.mk
|
||||||
|
|
||||||
|
|
|
@ -37,12 +37,18 @@ function get_partition_os_info(op_ubi)
|
||||||
local cp_info, ap_info
|
local cp_info, ap_info
|
||||||
if fs.access("/etc/os-release") then
|
if fs.access("/etc/os-release") then
|
||||||
cp_info = util.trim(util.exec('. /etc/os-release && echo "$PRETTY_NAME"'))
|
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
|
end
|
||||||
logger(i18n.translate("attempting to mount alternative partition") .. " (mtd" .. tostring(op_ubi) .. ")")
|
logger(i18n.translate("attempting to mount alternative partition") .. " (mtd" .. tostring(op_ubi) .. ")")
|
||||||
alt_partition_unmount(op_ubi)
|
alt_partition_unmount(op_ubi)
|
||||||
alt_partition_mount(op_ubi)
|
alt_partition_mount(op_ubi)
|
||||||
if fs.access("/alt/rom/etc/os-release") then
|
if fs.access("/alt/rom/etc/os-release") then
|
||||||
ap_info = util.trim(util.exec('. /alt/rom/etc/os-release && echo "$PRETTY_NAME"'))
|
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
|
end
|
||||||
logger(i18n.translate("attempting to unmount alternative partition") .. " (mtd" .. tostring(op_ubi) .. ")")
|
logger(i18n.translate("attempting to unmount alternative partition") .. " (mtd" .. tostring(op_ubi) .. ")")
|
||||||
alt_partition_unmount(op_ubi)
|
alt_partition_unmount(op_ubi)
|
||||||
|
|
Loading…
Reference in a new issue