Open Vogtinator opened 11 months ago
IIRC I had it like that originally but decided to put it in issue.d as it's more convenient to c&p from there in VMs with serial console. It's only there on first boot after all.
IIRC I had it like that originally but decided to put it in issue.d as it's more convenient to c&p from there in VMs with serial console. It's only there on first boot after all.
Copy-paste should work with dialog, maybe it needs --no-mouse
?
As supected there's an issue with line breaks in a default 80x24 tty. IIRC that's why I didn't do it:
In the actual image it even looked worse :-)
it actually fits with one space and using 0 as width to use the full width.
To avoid scrolling with the qr code we could use a yesno dialog with custom no label to show the qr code only on key press
Does it fit 80x24 with qrencode -m2
?
no difference AFAICT
could use something like this:
echo -ne "\nPlease take note of the following recovery key for disk unlocking:\n " > "$recoverymsgfile"
keyctl pipe "$crypt_keyid" >> "$recoverymsgfile"
if [ -x /usr/bin/qrencode ]; then
args=(--extra-button --extra-label "Show QR code")
fi
dialog --title "Disk Encryption Recovery Key" "${args[@]}" --textbox "$recoverymsgfile" 30 0
if [ "$?" = 3 ]; then
keyctl pipe "$crypt_keyid" | qrencode -t utf8i > "$recoverymsgfile"
dialog --title "QR code for mobile phone" --textbox "$recoverymsgfile" 30 0
fi
nevertheless I still think the issue.d file is just fine for the purpose
Don't keep it around in issue.d, where everyone can see it, but show it in a nicer way that also has to be confirmed by the user.