diff options
author | Sam Chudnick <sam@chudnick.com> | 2021-11-21 21:14:57 -0500 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2021-11-21 21:14:57 -0500 |
commit | 36b90e5aeaadfc157add46583beb58b622846453 (patch) | |
tree | 2abbcda224d66543c50f09d412ee2b0bc0c7f69e /.local/bin/cryptusb/mount-cryptusb | |
parent | 875d03a83c5fb42f526ffecb014bb62fc1705249 (diff) |
Check if USB has already been mapped and skip to mount command if it has been.
Diffstat (limited to '.local/bin/cryptusb/mount-cryptusb')
-rwxr-xr-x | .local/bin/cryptusb/mount-cryptusb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/cryptusb/mount-cryptusb b/.local/bin/cryptusb/mount-cryptusb index 882734c..ea44967 100755 --- a/.local/bin/cryptusb/mount-cryptusb +++ b/.local/bin/cryptusb/mount-cryptusb | |||
@@ -1,5 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # Mounts LUKS encrypted USB | 2 | # Mounts LUKS encrypted USB |
3 | 3 | ||
4 | sudo cryptsetup open /dev/sdc cryptusb | 4 | lsblk | grep -q "cryptusb" || sudo cryptsetup open /dev/sdc cryptusb |
5 | sudo mount /dev/mapper/cryptusb /mnt/cryptusb | 5 | sudo mount /dev/mapper/cryptusb /mnt/cryptusb |