Librem 5 LUKS Status

Hi,

@Hologram
A patch to see a message when it is waiting for the smartcard during boot.
It is for the https://github.com/sam-m7/smartcard-luks-osk/blob/master/files/decrypt_gnupg-sc-osk

--- decrypt_gnupg-sc-osk.orig	2021-10-17 17:58:47.125919486 +0200
+++ decrypt_gnupg-sc-osk	2021-10-17 18:01:42.690929892 +0200
@@ -27,7 +27,6 @@
 
 
 export SDL_VIDEODRIVER=kmsdrm
-plymouth hide-splash 2>/dev/null
 
 if [ -d "/cryptroot/gnupghome" ]; then
     export GNUPGHOME="/cryptroot/gnupghome"
@@ -61,15 +60,18 @@
     exit 1
 fi
 
+plymouth message --text "Insert your smartcard..." 2>/dev/null
 sc_available=0
 time_count=0
 while [ $sc_available -ne 1 ]; do
     if run_gpg --batch --quiet --no-tty --card-status >/dev/null
     then
 	sc_available=1
+ 	plymouth hide-splash 2>/dev/null
     else
 	if [ $time_count -gt 90 ]
 	then
+	    plymouth hide-splash 2>/dev/null
 	    echo "Using fallback and just forwarding keyboard output..." >&2
 	    exec /usr/bin/osk-sdl -v -k -d "${CRYPTTAB_SOURCE}" -n "${CRYPTTAB_NAME}" -c /etc/osk.conf
 	    plymouth show-splash 2>/dev/null

I successfully tested it on my Librem 5 (Byzantium) with my external smartcard reader.

Kind regards,
Christoph

3 Likes