|
Eris Linux A.P.I. 0.1
API to access Eris Linux system from a custom container
|
These functions are related to system restart. More...
Functions | |
| int | eris_reboot (void) |
| Reboot the system as soon as possible. | |
| int | eris_get_automatic_reboot_flag (void) |
| Read the Automatic-Reboot flag. | |
| int | eris_set_automatic_reboot_flag (int autoreboot) |
| Write the Automatic-Reboot flag. | |
| int | eris_get_reboot_needed_flag (void) |
| Check if a reboot is currently pending. | |
| int | eris_set_reboot_needed_flag (int flag) |
| Enable or cancel a pending reboot. | |
| int | eris_rollback (void) |
| Rollback to the previous system version. | |
| int | eris_restore_factory_preset (void) |
| Force the system to return to a factory preset state. | |
These functions are related to system restart.
| int eris_get_automatic_reboot_flag | ( | void | ) |
Read the Automatic-Reboot flag.
| 1 | Automatic reboot is allowed. |
| 0 | Reboot is differed until explicit request. |
| -1 | An error has occured during the request, errno is set appropriately. |
When an update is available for the Eris Linux system (not the container's content), it will be automatically downloaded as soon as it is detected. Once installation is complete the system must be rebooted in order to run the new system version. The Automatic Reboot flag determines whether the system reboots immediately after the update is installed or if it waits for a reboot request from the server or a container.
| int eris_get_reboot_needed_flag | ( | void | ) |
Check if a reboot is currently pending.
| 0 | No reboot is programmed. |
| 1 | A reboot will occur as soon as possible. |
| -1 | An error has occured during the request, errno is set appropriately. |
This flag may be set by the update system or any other custom application (see eris_set_reboot_needed_flag) to indicate that a reboot is needed to complete an update.
Please avoid starting time-consuming tasks or large data writing programs when the flag is set.
| int eris_reboot | ( | void | ) |
Reboot the system as soon as possible.
The system will reboot as soon as possible.
If some application is currently writing data on the flash memory, the data will probably be lost, and (in rare cases) the whole data partition may suffer from an inconsistent state when restarting.
| int eris_restore_factory_preset | ( | void | ) |
Force the system to return to a factory preset state.
Sometimes, it is necessary to reset the entire system to its factory default settings. For example, this function may be used to erase all personal pieces of information before reselling the device.
| int eris_rollback | ( | void | ) |
Rollback to the previous system version.
| int eris_set_automatic_reboot_flag | ( | int | autoreboot | ) |
Write the Automatic-Reboot flag.
| autoreboot | 1 (automatic reboot is allowed), 0 (reboot is differed until explicit request). |
When an update is available for the Eris Linux system (not the container's content), it will be automatically downloaded as soon as it is detected. Once installation is complete the system must be rebooted in order to run the new system version. The Automatic Reboot flag determines whether the system reboots immediately after the update is installed or if it waits for a reboot request from the server or a container.
| int eris_set_reboot_needed_flag | ( | int | flag | ) |
Enable or cancel a pending reboot.
| flag | 0 (reset) or 1 (set) the flag asking for a reboot. |