Skip to content

Commit

Permalink
chore(sign-kernel): Simplify signing
Browse files Browse the repository at this point in the history
Signed-off-by: RJ Sampson <[email protected]>
  • Loading branch information
EyeCantCU committed Jul 11, 2024
1 parent ba1d525 commit 482a474
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sign-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ fi
if [[ "${PRIVKEY}" == /* ]]; then
PRIVKEY_PATH="${PRIVKEY}"
else
PRIVKEY_PATH="/etc/pki/kernel/private/private_key.priv"
mkdir -p "$(dirname "$PRIVKEY_PATH")"
PRIVKEY_PATH="/tmp/private_key.priv"
if [[ "${PRIVKEY}" == ./* ]]; then
cp "${PRIVKEY}" "${PRIVKEY_PATH}"
elif [[ "${PRIVKEY}" == http* ]]; then
Expand Down Expand Up @@ -62,6 +61,7 @@ if [[ "${STRIP}" == true ]]; then
fi
fi
sbsign --cert $CRT_PATH --key $PRIVKEY_PATH /usr/lib/modules/$kernel_version/vmlinuz --output /usr/lib/modules/$kernel_version/vmlinuz
rm -rf $PRIVKEY_PATH
sbverify --list /usr/lib/modules/$kernel_version/vmlinuz

if command -v ostree; then
Expand Down

0 comments on commit 482a474

Please sign in to comment.