-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Inherit Subiquity's ability to configure block probing timeout (#…
…822) Port of canonical/subiquity#2073 to ubuntu-desktop bootstrap.
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 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,30 @@ | ||
#!/bin/sh | ||
|
||
# source the management script | ||
. "$SNAP"/management-script | ||
|
||
|
||
handle_block_probing_timeout_config() | ||
{ | ||
block_probing_timeout="$(block_probing_timeout)" | ||
|
||
case "${block_probing_timeout}" in | ||
no | none | null) | ||
# Special supported values for no timeout. | ||
;; | ||
default) | ||
# Special supported values for letting Subiquity decide. | ||
;; | ||
"" | *[!0-9]*) | ||
# Match everything else that is not an integer. | ||
echo "\"${block_probing_timeout}\" is not a valid block probing timeout" >&2 | ||
return 1 | ||
esac | ||
|
||
snapctl set block-probing-timeout="${block_probing_timeout}" | ||
|
||
# Restart subiquity-server to apply new config | ||
snapctl restart ubuntu-desktop-bootstrap | ||
} | ||
|
||
handle_block_probing_timeout_config |
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