Re: OverView page not showing all data after all hotfix's
Posted by
Gnomad on
Aug 18, 2017; 6:33am
URL: https://itus.accessinnov.com/OverView-page-not-showing-all-data-after-all-hotfix-s-tp995p1464.html
Hi Wisiwyg, you shouldn't have needed to change /sbin/fw_upgrade from
grep -oP "^\s*#\s*VER.*-\s*\K([0-9\.]+)(?=\s*#\s*$)" /sbin/fw_upgrade > /.do_date
date >> /.do_date
The first line containing the single >
replaces any pre-existing /.do_date file with the parsed version text.
Then the second line with double >>
appends the current date as a new line.
I'm not sure why you were seeing duplicates. (maybe you had a double >> on your first line?)
Without the duplicates though, /.do_date should then be successfully parsed by the latest
/usr/lib/lua/luci/view/admin_status/index.htm via
<tr><td width="33%"><%:Shield Update Version%></td><td><%=luci.sys.exec("head -n 1 /.do_date") or "?"%> <small style='color:#999;padding-left:3em'>/sbin/fw_upgrade</small></td></tr>
<tr><td width="33%"><%:Shield Update Last Run%></td><td><%=luci.sys.exec("tail -n 1 /.do_date | cut -c5-10") or "?"%></td></tr>
I converged both lines back into the original .do_date file, because .version was only later introduced specifically for display on the admin Status page (which I thought wasn't really needed).
OpenWrt SNAPSHOT, r10391-3d8d528939