From 0df674dc20c3335c1e90c2a7e2fa7beef835b046 Mon Sep 17 00:00:00 2001 From: Veiko Aasa Date: Tue, 28 Jul 2020 15:24:06 +0300 Subject: [PATCH] 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 Reviewed-by: James Valleroy --- debian/freedombox.postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/freedombox.postinst b/debian/freedombox.postinst index acd097800..6e7e1b0f9 100755 --- a/debian/freedombox.postinst +++ b/debian/freedombox.postinst @@ -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