mirror of
https://dev.iopsys.eu/system/sysmngr.git
synced 2025-12-10 08:14:38 +01:00
Updated logs in reboot method
This commit is contained in:
parent
d3a1696735
commit
9fc03d557e
1 changed files with 12 additions and 6 deletions
|
|
@ -212,12 +212,18 @@ static void _exec_reboot(const void *arg1, void *arg2)
|
||||||
dmuci_commit_package(config_name);
|
dmuci_commit_package(config_name);
|
||||||
|
|
||||||
sleep(3);
|
sleep(3);
|
||||||
dmubus_call_set("rpc-sys", "reboot", UBUS_ARGS{0}, 0);
|
dmubus_call_blocking("system", "reboot", UBUS_ARGS{0}, 0, NULL);
|
||||||
sleep(5); // Wait for reboot to happen
|
sleep(15); // Wait for reboot
|
||||||
BBFDM_ERR("Reboot call failed with rpc-sys, trying again with system");
|
BBFDM_INFO("Reboot call failed with system, trying again with reboot rpc-sys...");
|
||||||
dmubus_call_set("system", "reboot", UBUS_ARGS{0}, 0);
|
dmubus_call_blocking("rpc-sys", "reboot", UBUS_ARGS{0}, 0, NULL);
|
||||||
sleep(5); // Wait for reboot
|
sleep(15); // Wait for reboot to happen
|
||||||
BBFDM_ERR("Reboot call failed!!!");
|
BBFDM_WARNING("Reboot call failed with rpc-sys, trying again with reboot cmd ...");
|
||||||
|
run_cmd("reboot", NULL, 0);
|
||||||
|
sleep(15); // Wait for reboot
|
||||||
|
BBFDM_ERR("Reboot calls failed, trying hard reboot!!!");
|
||||||
|
run_cmd("reboot -f", NULL, 0);
|
||||||
|
sleep(15); // Wait for reboot
|
||||||
|
BBFDM_ERR("### Tried all reboot methods, nothing worked .....");
|
||||||
|
|
||||||
// Set last_reboot_cause to empty because there is a problem in the system reboot
|
// Set last_reboot_cause to empty because there is a problem in the system reboot
|
||||||
dmuci_set_value(config_name, "reboots", "last_reboot_cause", "");
|
dmuci_set_value(config_name, "reboots", "last_reboot_cause", "");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue