From c26187ba304f27a2f89eb52fda55311aabf1d123 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Tue, 29 Sep 2020 16:23:21 +0200 Subject: [PATCH] Implemented close decrypted --- scripts/image/setup.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/image/setup.sh b/scripts/image/setup.sh index e62d69c..3a7a9ec 100644 --- a/scripts/image/setup.sh +++ b/scripts/image/setup.sh @@ -461,13 +461,15 @@ if [ "$encrypt_system" == "y" ] echo "cp -v $crypttab_path $crypttab_rescue_path &&" echo "echo 'root '$encrypted_partition_path' none luks' >> $crypttab_path &&" echo "echo \"Content of $crypttab_path:\$(cat \"$crypttab_path\")\" &&" + #boot.txt just works with raspberry pi 3 @todo Needs to be implemented for arch raspbery pi 4 echo "cp -v $boot_txt_path $boot_txt_rescue_path &&" - echo "sed -i 's/$boot_txt_delete_line//g' $boot_txt_path &&" #@todo doesn't work yet - echo "sed -i 's/$boot_txt_setenv_origin/$boot_txt_setenv_replace/g' $boot_txt_path &&" #@todo doesn't work yet + echo "sed -i 's/$boot_txt_delete_line//g' $boot_txt_path &&" + echo "sed -i 's/$boot_txt_setenv_origin/$boot_txt_setenv_replace/g' $boot_txt_path &&" echo "echo \"Content of $boot_txt_path:\$(cat \"$boot_txt_path\")\" &&" echo "cd /boot/ && ./mkscr &&" echo "umount $root_mapper_path &&" - echo "exit || echo 'Error in chroot environment!' && exit 1" + echo "sudo cryptsetup -v luksClose root &&" + echo "exit || echo 'Error in chroot environment!' echo 'Trying to close decrypted root.'; sudo cryptsetup -v luksClose root" ) | chroot "$root_mount_path" /bin/bash || error fi