debian: Add newline to end of /var/lib/plinth/firstboot-wizard-secret

Fixes #1882

Tests performed:
- During the .deb package installation, the firstboot secret
  is shown correctly
- the firstboot secret is separated from the next prompt after
  running `cat /var/lib/plinth/firstboot-wizard-secret`
- plinth web interface accepts the firstboot secret

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Veiko Aasa 2020-07-28 15:24:06 +03:00 committed by James Valleroy
parent 7033cde212
commit 0df674dc20
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -29,7 +29,7 @@ case "$1" in
if [ ! -e '/var/lib/freedombox/is-freedombox-disk-image' ]; then
umask 377
cat /dev/urandom | base64 | head -c16 > /var/lib/plinth/firstboot-wizard-secret
echo $(cat /dev/urandom | base64 | head -c16) > /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