mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2025-12-10 07:44:41 +01:00
Set last_reboot_cause option to 'RemoteReboot' when rebooting via cwmp
This commit is contained in:
parent
384c929c51
commit
5c6a4ff73b
1 changed files with 7 additions and 0 deletions
|
|
@ -409,6 +409,9 @@ void cwmp_reboot(const char *command_key)
|
||||||
{
|
{
|
||||||
set_rpc_parameter_key(command_key);
|
set_rpc_parameter_key(command_key);
|
||||||
|
|
||||||
|
// Set last_reboot_cause to 'RemoteReboot' because the upcoming reboot will be initiated by CWMP Reboot RPC
|
||||||
|
set_uci_path_value(NULL, "deviceinfo.globals.last_reboot_cause", "RemoteReboot");
|
||||||
|
|
||||||
struct blob_buf b = { 0 };
|
struct blob_buf b = { 0 };
|
||||||
CWMP_MEMSET(&b, 0, sizeof(struct blob_buf));
|
CWMP_MEMSET(&b, 0, sizeof(struct blob_buf));
|
||||||
blob_buf_init(&b, 0);
|
blob_buf_init(&b, 0);
|
||||||
|
|
@ -419,6 +422,10 @@ void cwmp_reboot(const char *command_key)
|
||||||
|
|
||||||
// Wait before exit to avoid getting restarted by procd
|
// Wait before exit to avoid getting restarted by procd
|
||||||
sleep(300);
|
sleep(300);
|
||||||
|
|
||||||
|
// Set last_reboot_cause to empty because there is a problem in the system reboot
|
||||||
|
set_uci_path_value(NULL, "deviceinfo.globals.last_reboot_cause", "");
|
||||||
|
|
||||||
CWMP_LOG(ERROR, "# Problem in system restart #");
|
CWMP_LOG(ERROR, "# Problem in system restart #");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue