Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You cannot say no to encryption due to missing No ) Statement #125

Closed
ghost opened this issue Oct 12, 2019 · 1 comment
Closed

You cannot say no to encryption due to missing No ) Statement #125

ghost opened this issue Oct 12, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 12, 2019

case $yn,$REPLY in
Yes,*|*,Yes )
CRYPTO=true
# Since iteration count is based on cpu power, and the rk3288 isn't as fast as a usual
# desktop cpu, manually supply -i 15000 for security at the cost of a slightly slower unlock
echo "Now to setup the password you would like to use to unlock the encrypted root partition at boot"
cryptsetup -q -y -s 512 luksFormat -i 15000 /dev/$ROOT_DEV_NAME || exit 1
echo "Now unlock the newly created encrypted root partition so we can mount it and install the filesystem"
cryptsetup luksOpen /dev/$ROOT_DEV_NAME luksroot || exit 1
ROOT_DEV_NAME=mapper/luksroot
#set the root encryption flag
touch /mnt/boot/root_encryption
break
;;
* )

fixed it with:

    case $yn in
    Yes ) ....
    No )
    	break
    	;;
    * )
        echo "Invalid Option, please enter Yes or No, 1 or 2"
        ;;

which works for every case, invalid input, 1 and 2.

@SolidHal
Copy link
Owner

Good catch, I tested lots of user input for enabling encryption but none for not!
The reason for the odd

case $yn,$REPLY in 
Yes,*|*,Yes ) 

syntax instead of just

case $yn in 
Yes ) 

Is to enable accepting 1 or Yes and 2 or No, otherwise you can only input 1 and 2 which I didn't think was very user friendly.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant