setup_automatic_updates

Function setup_automatic_updates 

Source
pub fn setup_automatic_updates(
    config: &Config,
    rollback: &RollbackManager,
) -> Result<(), Box<dyn Error>>
Expand description

Sets up automatic updates based on the Linux distribution specified in the configuration.

This function determines the appropriate update mechanism based on the Linux distribution and calls the corresponding setup function. It creates a snapshot before starting the setup process for potential rollback.

§Arguments

  • config - A reference to the Config struct containing the Linux distribution information
  • rollback - A reference to the RollbackManager for creating snapshots

§Returns

Returns Ok(()) if automatic updates are set up successfully, or an error if setup fails.