Skip to content

contrib: support trailing commas in sbctl setup output #328

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

Merged
merged 1 commit into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/kernel-install/91-sbctl.install
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ add)

# exit without error if keys don't exist
# https://github.com/Foxboron/sbctl/issues/187
if ! [ "$(sbctl setup --print-state --json | grep installed | awk '{print $2}')" = "true" ]; then
if ! [ "$(sbctl setup --print-state --json | awk '/installed/ { gsub(/,$/,"",$2); print $2 }')" = "true" ]; then
echo "Secureboot key directory doesn't exist, not signing!"
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion contrib/mkinitcpio/sbctl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
KERNEL_FILE="$1"
UKI_FILE="$3"

if ! [ "$(sbctl setup --print-state --json | grep installed | awk '{print $2}')" = "true" ]; then
if ! [ "$(sbctl setup --print-state --json | awk '/installed/ { gsub(/,$/,"",$2); print $2 }')" = "true" ]; then
echo "Secureboot key directory doesn't exist, not signing!"
exit 0
fi
Expand Down