parent
6819565d79
commit
c748e17279
4 changed files with 11 additions and 30 deletions
pkgs/rootfs
|
@ -1,23 +1,9 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
set -ex -uo pipefail
|
||||
|
||||
enroll=
|
||||
for o in $(< /proc/cmdline); do
|
||||
case $o in
|
||||
patos.secureboot=*)
|
||||
enroll=${o#*=}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$enroll" ]; then
|
||||
echo 'No patos.secureboot= parameter on the kernel command line' >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
SETUP_MODE=$(sbctl status --json | jq -r '.setup_mode')
|
||||
|
||||
[ "$SETUP_MODE" = "false" -o "$enroll" != "true" ] && exit 0
|
||||
[ "$SETUP_MODE" = "false" ] && exit 0
|
||||
|
||||
cat <<EOL> /run/sbctl.yml
|
||||
---
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue