-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #876 from kernelkit/change-boot-order
Change boot order
- Loading branch information
Showing
17 changed files
with
229 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,10 @@ submodule infix-system-software { | |
contact "[email protected]"; | ||
description "Software status and upgrade."; | ||
|
||
revision 2024-12-16 { | ||
description "Add boot-order operational data"; | ||
reference "Internal"; | ||
} | ||
revision 2023-06-27 { | ||
description "Initial revision."; | ||
reference "internal"; | ||
|
@@ -39,6 +43,18 @@ submodule infix-system-software { | |
} | ||
} | ||
|
||
grouping boot-order { | ||
leaf-list boot-order { | ||
type enumeration { | ||
enum "primary"; | ||
enum "secondary"; | ||
enum "net"; | ||
} | ||
ordered-by user; | ||
min-elements 1; // At least one value is required | ||
max-elements 3; // Ensure reasonable maximum size if needed | ||
} | ||
} | ||
grouping installer-state { | ||
leaf operation { | ||
type string; | ||
|
@@ -64,7 +80,6 @@ submodule infix-system-software { | |
"The last error encountered by the installer service."; | ||
} | ||
} | ||
|
||
augment "/sys:system-state" { | ||
container software { | ||
description | ||
|
@@ -95,6 +110,7 @@ submodule infix-system-software { | |
description | ||
"Slot from which the system was booted."; | ||
} | ||
uses boot-order; | ||
|
||
container installer { | ||
description | ||
|
@@ -184,7 +200,7 @@ submodule infix-system-software { | |
} | ||
|
||
rpc install-bundle { | ||
nacm:default-deny-all; | ||
nacm:default-deny-all; | ||
description | ||
"Upgrade the system's software by installing the specified bundle."; | ||
input { | ||
|
@@ -198,4 +214,17 @@ nacm:default-deny-all; | |
} | ||
} | ||
} | ||
rpc set-boot-order { | ||
nacm:default-deny-all; | ||
description | ||
"Set order of boot partitions"; | ||
input { | ||
uses boot-order; | ||
must "count(boot-order[.='primary']) <= 1 and | ||
count(boot-order[.='secondary']) <= 1 and | ||
count(boot-order[.='net']) <= 1" { | ||
error-message "Not possible to have duplicate targets in boot order."; | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[7mBOOT ORDER[0m | ||
net primary secondary | ||
|
||
[7mNAME STATE VERSION DATE [0m | ||
secondary inactive pr873.2a39a38 2024-12-16T14:40:54Z | ||
primary inactive pr871.a4ef38f 2024-12-13T20:00:42Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
BOOT_ORDER=net primary secondary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"compatible":"infix-x86_64","variant":"","booted":"primary","boot_primary":"rootfs.0","slots":[{"rootfs.1":{"class":"rootfs","device":"/dev/disk/by-partlabel/secondary","type":"raw","bootname":"secondary","state":"inactive","parent":null,"mountpoint":null,"boot_status":"good"}},{"rootfs.0":{"class":"rootfs","device":"/dev/disk/by-partlabel/primary","type":"raw","bootname":"primary","state":"booted","parent":null,"mountpoint":null,"boot_status":"good"}},{"net.0":{"class":"net","device":"/dev/ram0","type":"raw","bootname":"net","state":"inactive","parent":null,"mountpoint":null,"boot_status":"good"}}]} | ||
{"compatible":"infix-aarch64","variant":"","booted":"net","boot_primary":"net.0","slots":[{"rootfs.1":{"class":"rootfs","device":"/dev/disk/by-partlabel/secondary","type":"raw","bootname":"secondary","state":"inactive","parent":null,"mountpoint":null,"boot_status":"bad","slot_status":{"bundle":{"compatible":"infix-aarch64","version":"pr873.2a39a38","hash":"99a9543fe85a2b32a4a28409f7103099fd8cfce3f3bbccb5175ace74e7bf9ea6"},"checksum":{"sha256":"d2595e8af8468c19a5da6c3fffbf27ff8e00d7ac2559a87f60591829151fd7e3","size":59707392},"installed":{"timestamp":"2024-12-16T14:40:54Z","count":12},"activated":{"timestamp":"2024-12-16T14:40:54Z","count":12},"status":"ok"}}},{"rootfs.0":{"class":"rootfs","device":"/dev/disk/by-partlabel/primary","type":"raw","bootname":"primary","state":"inactive","parent":null,"mountpoint":null,"boot_status":"bad","slot_status":{"bundle":{"compatible":"infix-aarch64","version":"pr871.a4ef38f","hash":"d36189afff31ac1193ee7eda161f7e9b2007df08ccdc0014cfa231f9a836780a"},"checksum":{"sha256":"d78a9ef52f08238972b6b9151c381327dd0c40e410f9ed4634e379056f9bacd8","size":59699200},"installed":{"timestamp":"2024-12-13T20:00:42Z","count":3},"activated":{"timestamp":"2024-12-13T20:00:42Z","count":4},"status":"ok"}}},{"net.0":{"class":"net","device":"/dev/ram0","type":"raw","bootname":"net","state":"booted","parent":null,"mountpoint":null,"boot_status":"good","slot_status":{"bundle":{"compatible":null}}}}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.