2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-06-02 17:28:32 +00:00

Add sample material for nodeconsole automation for MOK manipulation

This commit is contained in:
Jarrod Johnson
2026-05-14 17:26:39 -04:00
parent d6ed984cb5
commit 1754636c3f
4 changed files with 50 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
expect Press any key to perform MOK management
send a
expect Delete MOK
send <down><enter>
expect Continue
send <down><enter>
expect Yes
send <down><enter>
expect Password:
send <env:MOKPASS><enter>
expect Reboot
send <enter>
exit
+13
View File
@@ -0,0 +1,13 @@
expect Press any key to perform MOK management
send a
expect Enroll MOK
send <down><enter>
expect Continue
send <down><enter>
expect Yes
send <down><enter>
expect Password:
send <env:MOKPASS><enter>
expect Reboot
send <enter>
exit
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
if [ -z "$MOKPASS" ]; then
echo "MOKPASS must be set to proceed"
exit 1
fi
set -euo pipefail
node=$2
file=$1
nodersync $file $node:/tmp/
ssh $node mokutil --delete /tmp/$file --root-pw
ssh $node reboot
nodeconsole $node -ea deletemok.nca
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
if [ -z "$MOKPASS" ]; then
echo "MOKPASS must be set to proceed"
exit 1
fi
set -euo pipefail
node=$2
file=$1
nodersync $file $node:/tmp/
ssh $node mokutil --import /tmp/$file --root-pw
ssh $node reboot
nodeconsole $node -ea enrollmok.nca