Eris Linux A.P.I. 0.1
API to access Eris Linux system from a custom container
Loading...
Searching...
No Matches
REBOOT

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.

Detailed Description

These functions are related to system restart.

Function Documentation

◆ eris_get_automatic_reboot_flag()

int eris_get_automatic_reboot_flag ( void )

Read the Automatic-Reboot flag.

Return values
1Automatic reboot is allowed.
0Reboot is differed until explicit request.
-1An 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.

◆ eris_get_reboot_needed_flag()

int eris_get_reboot_needed_flag ( void )

Check if a reboot is currently pending.

Return values
0No reboot is programmed.
1A reboot will occur as soon as possible.
-1An 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.

◆ eris_reboot()

int eris_reboot ( void )

Reboot the system as soon as possible.

Returns
0 on success, -1 on error and errno is set appropriately.

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.

◆ eris_restore_factory_preset()

int eris_restore_factory_preset ( void )

Force the system to return to a factory preset state.

Returns
only on error.

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.

◆ eris_rollback()

int eris_rollback ( void )

Rollback to the previous system version.

Returns
0 on success, -1 on error and errno is set appropriately.

◆ eris_set_automatic_reboot_flag()

int eris_set_automatic_reboot_flag ( int autoreboot)

Write the Automatic-Reboot flag.

Parameters
autoreboot1 (automatic reboot is allowed), 0 (reboot is differed until explicit request).
Returns
0 on success or -1 on error and 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.

◆ eris_set_reboot_needed_flag()

int eris_set_reboot_needed_flag ( int flag)

Enable or cancel a pending reboot.

Parameters
flag0 (reset) or 1 (set) the flag asking for a reboot.
Returns
0 on success and -1 on error and errno is set appropriately.