-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release,os: ensure data partition label/resize services only run once
This adds additional safeguards to prevent a different data partition from being labeled and resized if the host has ever booted successfully in the past with an original data partition.
- Loading branch information
Showing
4 changed files
with
24 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=Checks and marks if boot has ever succeeded before | ||
DefaultDependencies=no | ||
Before=label-data-alternative.service label-data-preferred.service | ||
RequiresMountsFor=/etc | ||
|
||
[Service] | ||
Type=oneshot | ||
# Check if boot has ever succeeded before | ||
ExecStart=/bin/signpost has-boot-ever-succeeded | ||
RemainAfterExit=true | ||
# If boot has succeeded before, the marker file will be non-zero-sized | ||
StandardOutput=file:/etc/has-boot-ever-succeeded | ||
|
||
[Install] | ||
WantedBy=local-fs.target |
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