Skip to content

Commit a91e917

Browse files
committed
_ceremony: eject the OKOS cd & prompt operator for the auth cd
1 parent 52df42e commit a91e917

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

script/_ceremony

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,26 @@ set -eou pipefail
44

55
. oks-lib.sh
66

7+
command_on_path blockdev
78
command_on_path lpinfo
89
command_on_path systemctl
910
command_on_path sed
1011
command_on_path oks
1112

13+
eject "$CD_DEV"
14+
echo -e "\nInsert OKS HSM Auth CD, close drive tray,"
15+
read -p "then press Enter to continue..."
16+
COUNT=5
17+
while [ $COUNT -gt 0 ]; do
18+
if ! blockdev --getsize64 "$CD_DEV" >/dev/null 2>&1; then
19+
COUNT=$(($COUNT-1))
20+
echo "Waiting for CD drive to \"settle\""
21+
sleep 10
22+
else
23+
break
24+
fi
25+
done
26+
1227
# NixOS generates `printers.conf` for us but we can't know the printers SN in
1328
# advance of the first ceremony where it's used. As a work-around we query cups
1429
# for the serial number for the attached printer and then swap it in

0 commit comments

Comments
 (0)