Skip to content

Add support for unattended upgrades #1301

Description

@mattiaswal

Description

Run a script in cron defined by user settings in the YANG model.

Example YANG:

  augment "/sys:system" {
    container unattended-upgrades {
      description
        "Configuration for automatic system software updates.

        When enabled, the system will automatically check for and
        install software upgrades at the specified time.";

      leaf enable {
        type boolean;
        default false;
        description
          "Enable or disable unattended upgrades.

          When set to true, the system will automatically check for
          available software updates and install them at the configured
          time.";
      }

      leaf time {
        type string {
          pattern '[0-2][0-9]:[0-5][0-9]';
        }
        mandatory true;
        description
          "Time of day to run the upgrade check and installation.

          Specified in 24-hour format as HH:MM (e.g., '02:00' for 2 AM,
          '14:30' for 2:30 PM).";
      }

      leaf-list day-of-week {
        type enumeration {
          enum "monday";
          enum "tuesday";
          enum "wednesday";
          enum "thursday";
          enum "friday";
          enum "saturday";
          enum "sunday";
        }
        description
          "Days of the week to run unattended upgrades.

          If not specified, upgrades will run daily. Multiple days
          can be selected to run upgrades only on specific days of
          the week.";
      }
    }
  }

Additional Information

No response

General Information

Anyone can help out by sponsoring development of new features or contributing pull requests.
Please use this issue for discussions related to the feature.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cn:dreamCommon Name: Dream ProjectenhancementNew feature or request

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions