From 238c0cecd6438b2bcfa5f4d98a33d67ae280845d Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Wed, 26 Aug 2020 08:23:46 -0400 Subject: [PATCH] debian: Don't show first wizard secret on command line Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- debian/freedombox.postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/freedombox.postinst b/debian/freedombox.postinst index 6e7e1b0f9..887a8472a 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 - 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