encryptionmenu2 943 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. encryptionmenu2() {
  3. options=" /dev/sda1\n /dev/sdb1\n /dev/sdc1\n /dev/sdd1\n /dev/sde1"
  4. selected=$(echo "$options" | dmenu -i -p "Encrypt which drive?" )
  5. if [ "$selected" = " /dev/sda1" ]; then
  6. $TERMINAL sh -c 'doas cryptsetup open /dev/sda1 usb && doas mount /dev/mapper/usb /mnt; exec zsh'
  7. elif [ "$selected" = " /dev/sdb1" ]; then
  8. $TERMINAL sh -c 'doas cryptsetup open /dev/sdb1 usb && doas mount /dev/mapper/usb /mnt; exec zsh'
  9. elif [ "$selected" = " /dev/sdc1" ]; then
  10. $TERMINAL sh -c 'doas cryptsetup open /dev/sdc1 usb && doas mount /dev/mapper/usb /mnt; exec zsh'
  11. elif [ "$selected" = " /dev/sdd1" ]; then
  12. $TERMINAL sh -c 'doas cryptsetup open /dev/sdd1 usb && doas mount /dev/mapper/usb /mnt; exec zsh'
  13. elif [ "$selected" = " /dev/sde1" ]; then
  14. $TERMINAL sh -c 'doas cryptsetup open /dev/sdd1 usb && doas mount /dev/mapper/usb /mnt; exec zsh'
  15. return
  16. fi
  17. }
  18. encryptionmenu2