Last active
September 4, 2025 06:44
-
-
Save ktechmidas/ea7b4e8f3bcf95041309afea8188245a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
# sbctl automatic kernel signing hook for Pop!_OS | |
# This script automatically signs new kernels with sbctl when they're installed | |
set -e | |
KERNEL_VERSION="$1" | |
KERNEL_IMAGE="$2" | |
if [ -z "$KERNEL_VERSION" ] || [ -z "$KERNEL_IMAGE" ]; then | |
echo "Error: Missing kernel version or image path" >&2 | |
exit 1 | |
fi | |
# Check if sbctl is installed | |
if ! command -v sbctl &> /dev/null; then | |
echo "sbctl not found, skipping kernel signing" >&2 | |
exit 0 | |
fi | |
echo "Signing kernel $KERNEL_VERSION with sbctl..." | |
# Sign the kernel image | |
sbctl sign -s "$KERNEL_IMAGE" | |
# Verify the signatures | |
echo "Verifying signatures..." | |
sbctl verify | |
echo "Kernel $KERNEL_VERSION signed successfully!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment