summaryrefslogtreecommitdiff
path: root/umount_crypt
blob: 489d8d3df488e55c2a7126063faae66e53e36eab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/zsh

. /home/pks/bin/func.zsh
check_root

if [ "$#" -ne 2 ]; then
  echo "missing args: umount_crypt <name>"
  exit
fi

NAME=$1

umount /media/$NAME
cryptsetup luksClose /dev/mapper/$NAME