From 1501f2b7d9def0db6a7f607849ba06caf9c4f4c4 Mon Sep 17 00:00:00 2001
From: Raphael Geissert <geissert@debian.org>
Date: Mon, 16 Sep 2013 10:39:05 +0200
Subject: [PATCH] Don't use text tools with binary input

The reason they were there in the first place is unknown to me, but at
best they would reduce the amount of random data. If, however, the
intention was to add them *after* the call to od(1) they would also drop
(quite some) lines of output.

Git blames 28ff543a57f6f380532e2b37b10f70cfe36f751b as the commit that
introduced the file.
---
 lib/setup-storage/Commands.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/setup-storage/Commands.pm b/lib/setup-storage/Commands.pm
index 72dd05b..6e5d80b 100644
--- a/lib/setup-storage/Commands.pm
+++ b/lib/setup-storage/Commands.pm
@@ -238,7 +238,7 @@ sub build_cryptsetup_commands {
 
         # generate a key for encryption
         &FAI::push_command(
-          "head -c 2048 /dev/urandom | head -n 47 | tail -n 46 | od | tee $keyfile",
+          "head -c 2048 /dev/urandom | od | tee $keyfile",
           "", "keyfile_$real_dev" );
         # encrypt
         &FAI::push_command(
-- 
1.7.10.4

