Makefile for basic installation added
[truecrypt-extra.git] / etc.pm.sleep-d.20_unmount-truecrypt-containers
1 #! /bin/sh
2
3 ### TrueCrypt PM Sleep Unmounter
4 ### This file is a part of `truecrypt-extra`
5 ###
6 ### (c) Andrew Sichevoi, http://thekondor.net
7 ### Distributed in the terms of GNU GPL v3.0+ license
8 ###
9 ### The latest version is available on http://git.thekondor.net
10
11 if [ -f /etc/default/truecrypt ]; then
12   . /etc/default/truecrypt
13 fi
14
15 unmount_all_truecrypt_volumes ()
16 {
17   ${TRUECRYPT_BINARY} -d
18 }
19
20 case $1 in
21   suspend|suspend_hybrid|hibernate)
22     if "${UNMOUNT_ON_SLEEP}"; then
23             unmount_all_truecrypt_volumes
24     fi
25   ;;
26   resume|thaw)
27           ### There is no need to do anything here
28         :
29   ;;
30 esac
31