[PATCH 6/5] cryptsetup does not like running in a while read loop.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add some additional manglage to ensure that stdin/stdout is always pointing 
the right thing.  A more elegant way of doing this would be much appreciated

---
 hooks/cryptroot.sh |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/hooks/cryptroot.sh b/hooks/cryptroot.sh
index 739f5d3..4a4abb3 100755
--- a/hooks/cryptroot.sh
+++ b/hooks/cryptroot.sh
@@ -2,7 +2,9 @@
 [ -s /cryptroot ] && { 
     udevadm control --stop_exec_queue
     while read cryptopts; do
-       /sbin/cryptsetup luksOpen $cryptopts
+       (   exec >/dev/console 2>&1 </dev/console
+           /sbin/cryptsetup luksOpen $cryptopts || emergency_shell
+       )
     done </cryptroot
     >/cryptroot
     udevadm control --start_exec_queue


--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux