mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-11-22 07:01:03 +01:00
Implemented close decrypted
This commit is contained in:
parent
05a7499b9d
commit
c26187ba30
@ -461,13 +461,15 @@ if [ "$encrypt_system" == "y" ]
|
|||||||
echo "cp -v $crypttab_path $crypttab_rescue_path &&"
|
echo "cp -v $crypttab_path $crypttab_rescue_path &&"
|
||||||
echo "echo 'root '$encrypted_partition_path' none luks' >> $crypttab_path &&"
|
echo "echo 'root '$encrypted_partition_path' none luks' >> $crypttab_path &&"
|
||||||
echo "echo \"Content of $crypttab_path:\$(cat \"$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 "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_delete_line//g' $boot_txt_path &&"
|
||||||
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_setenv_origin/$boot_txt_setenv_replace/g' $boot_txt_path &&"
|
||||||
echo "echo \"Content of $boot_txt_path:\$(cat \"$boot_txt_path\")\" &&"
|
echo "echo \"Content of $boot_txt_path:\$(cat \"$boot_txt_path\")\" &&"
|
||||||
echo "cd /boot/ && ./mkscr &&"
|
echo "cd /boot/ && ./mkscr &&"
|
||||||
echo "umount $root_mapper_path &&"
|
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
|
) | chroot "$root_mount_path" /bin/bash || error
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user