-
Notifications
You must be signed in to change notification settings - Fork 2.7k
luci-app-advanced-reboot: update to 1.1.1 #7919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
e4888b6 to
2920e18
Compare
|
I've addressed the issues discovered in testing, unless there's any feedback it should be ready to merge. If @systemcrash @stokito @champtar @Ramon00 or anyone else have time to review and comment on the new code, I'd be much obliged. |
applications/luci-app-advanced-reboot/root/usr/share/rpcd/ucode/luci.advanced-reboot
Outdated
Show resolved
Hide resolved
applications/luci-app-advanced-reboot/root/usr/share/rpcd/ucode/luci.advanced-reboot
Outdated
Show resolved
Hide resolved
|
Perhaps some more comments for each functions which give examples of sane input values - useful when following each step. |
applications/luci-app-advanced-reboot/root/usr/share/rpcd/ucode/luci.advanced-reboot
Show resolved
Hide resolved
sorry do you mean the RPC functions or all functions in ucode? |
applications/luci-app-advanced-reboot/root/usr/share/advanced-reboot/devices/xiaomi-ax3600.json
Show resolved
Hide resolved
ucode. |
2920e18 to
7c75fbb
Compare
applications/luci-app-advanced-reboot/root/usr/share/rpcd/ucode/luci.advanced-reboot
Show resolved
Hide resolved
applications/luci-app-advanced-reboot/root/usr/share/rpcd/ucode/luci.advanced-reboot
Outdated
Show resolved
Hide resolved
applications/luci-app-advanced-reboot/root/usr/share/rpcd/ucode/luci.advanced-reboot
Outdated
Show resolved
Hide resolved
| return { label: label, os: kver }; | ||
| } | ||
|
|
||
| /* Read current OS name from /etc/os-release, normalized for snapshot */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do snapshots no longer use /etc/os-release ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not if it's a comment for
function get_partition_info_current() {
return get_volume_info("/");
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, there used to be two different functions for current and alt info getters and now they use mostly the same code if the alt partition's UBI can be mounted. if you can suggest a more elegant code, please do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point was: is /* Read current OS name from /etc/os-release, normalized for snapshot */ a suitable comment for a function that does return get_volume_info("/");?
7629aef to
baf0320
Compare
|
Still working on more comments for still "undocumented" functions as per @systemcrash advise. |
A few that lack comments is OK - but a cursory hint to what most of the functions do is really helpful, especially to reviewers :) |
|
LGTM |
baf0320 to
308a490
Compare
This is a massive overwrite of the RPCD code from shell scrit to ucode which in turn brought: * update to the device json schema, which is now: * more structured * no weird names/object in json * customizable get, set, save commands per device (still need to be defined in ACL) * single partitions array now holding all data for toggling/labels/altMount * support for more than 2 bootable partition devices * a _device_json_transform.jq file to translate schema from old format to new one for any WIP devices * simplification of RPCD script as object can now be returned * adjustments to the Javascript to parse new error messages and new RPCD reply structure * integrate @systemcrash provided code/suggestions I have tested both UBI volumes and dd-based information gathering on alternative partition, I'd still welcome: * tests on as many Linksys devices for actual partition toggling (rebooting to alternative) * tests for both information gathering and partition toggling on: * "d-link,dgs-1210-28" * "mercusys,mr90x-v1" * "zyxel,nbg6817" I also gladly welcome any code reviews for both updated javascript and ucode. Signed-off-by: Stan Grishin <[email protected]>
308a490 to
0a9ee78
Compare
|
@systemcrash updated the ucode with (mostly AI-generated) function descriptions. I've also tried to adjust the Makefile to generate the devices.json during build and remove no longer needed directories when building the package. |
|
ping @stangri |
|
@systemcrash I'll be back mid-December, so hoping to push latest fix(es) and merge between then and X-mas. |
Maintainer: me
Compile tested: x86_64, Linksys MX4200v1, OpenWrt 24.10.2
Run tested: x86_64, Linksys MX4200v1, OpenWrt 24.10.2
Description:
This is a massive overwrite of the RPCD code from shell script to ucode which in turn brought:
I have tested both UBI volumes and dd-based information gathering on alternative partition, I'd still welcome:
I also gladly welcome any code reviews for both updated javascript and ucode.