debian: Don't show first wizard secret on command line

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy 2020-08-26 08:23:46 -04:00 committed by Sunil Mohan Adapa
parent 822c322d20
commit 238c0cecd6
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -29,7 +29,7 @@ case "$1" in
if [ ! -e '/var/lib/freedombox/is-freedombox-disk-image' ]; then
umask 377
echo $(cat /dev/urandom | base64 | head -c16) > /var/lib/plinth/firstboot-wizard-secret
base64 < /dev/urandom | head -c 16 | sed -e 's+$+\n+' > /var/lib/plinth/firstboot-wizard-secret
chown plinth:plinth /var/lib/plinth/firstboot-wizard-secret
db_subst plinth/firstboot_wizard_secret secret $(cat /var/lib/plinth/firstboot-wizard-secret)
db_input high plinth/firstboot_wizard_secret || true