-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix name of secureboot
requirement
#167
Conversation
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
bin/test-image
Outdated
# Some distros don't support secure boot. | ||
case "${DISTRO}" in | ||
alpine|archlinux|gentoo|nixos) | ||
lxc config set "${TEST_IMAGE}" security.secureboot=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt this be false?
Whats with the )
at the end but no starting bracket, is this some weird bash-ism?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, indeed, false
it should have been. Fixed, thanks.
As for the )
missing the opening one, it is not a bashism but now that you call it out it looks weird. man dash
:
The syntax of the case command is
case word in
[(]pattern) list ;;
...
esac
The pattern can actually be one or more patterns (see Shell Patterns described later), separated by “|” characters.
The “(” character before the pattern is optional.
I don't remember seeing case
with an opening (
though. I'm fine introducing it if that reads better for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok thanks, from my PHP, Java, Go, C eyes thats a definite code smell, but seems like its ok in shell.
Signed-off-by: Simon Deziel <[email protected]>
While copying even 1GiB worth of a desktop VM image is quick, it wastes disks and is not needed as `lxc image import` is only reading from the source files. Signed-off-by: Simon Deziel <[email protected]>
https://www.freedesktop.org/software/systemd/man/latest/sd_booted.html: > Internally, this function checks whether the directory /run/systemd/system/ > exists. A simple check like this can also be implemented trivially in shell > or any other language. Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Previously, a failure from `./bin/test-image` would abort immediatly due to `set -e`. Now, we get a chance of echo'ing that it failed. Signed-off-by: Simon Deziel <[email protected]>
Thanks! |
Fixes canonical/lxd#13409
Also, fix/improve a few things along the way.
It's too bad that
bin/test-image
cannot consult the image requirements otherwise it would have been possible to look if the image being tested is not going to work withsecureboot
. For now I hardcoded the known incompatible distros but if @MusicDin you know better, please let me know!