~mrooney/ecryptfs/nautilus-integration

« back to all changes in this revision

Viewing changes to src/utils/ecryptfs-dot-private

  • Committer: Dustin Kirkland
  • Date: 2009-02-16 21:06:29 UTC
  • Revision ID: kirkland@canonical.com-20090216210629-33cr0byhn9o5vj58
typo in Makefile.am

Missing ')'.  Thanks Michal for pointing out.

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -e
2
 
#
3
 
#    ecryptfs-dot-private
4
 
#    Copyright (C) 2009 Canonical Ltd.
5
 
#
6
 
#    Authors: Dustin Kirkland <kirkland@canonical.com>
7
 
#
8
 
#    This program is free software: you can redistribute it and/or modify
9
 
#    it under the terms of the GNU General Public License as published by
10
 
#    the Free Software Foundation, version 2 of the License.
11
 
#
12
 
#    This program is distributed in the hope that it will be useful,
13
 
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
#    GNU General Public License for more details.
16
 
#
17
 
#    You should have received a copy of the GNU General Public License
18
 
 
19
 
if echo "$0" | grep -qs "ecryptfs"; then
20
 
        echo "ERROR: This file must be sourced, rather than executed:"
21
 
        echo
22
 
        echo "  . $0"
23
 
        echo
24
 
        exit 1
25
 
fi
26
 
 
27
 
# Hacky, umount.ecryptfs_private should be taught to exit 1 on
28
 
# unsuccessful unmount, must check who else depends on this exit code.
29
 
if /sbin/umount.ecryptfs_private | grep -v "Sessions still open"; then
30
 
        cd "$HOME"/.Private
31
 
else
32
 
        echo "ERROR: Unable to access .Private, please close some sessions"
33
 
fi
34
 
/sbin/mount.ecryptfs_private