~ubuntu-branches/debian/sid/ecryptfs-utils/sid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-04-25 09:49:00 UTC
  • mto: (1.4.1 upstream) (13.1.3 sid)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20090425094900-29zmexzvikuoapgc
Tags: upstream-74
ImportĀ upstreamĀ versionĀ 74

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
# Check that the mount point and encrypted directory are empty (skip symlinks).
222
222
# Perhaps one day we could provide a migration mode (using rsync or something),
223
223
# but this would be VERY hard to do safely.
224
 
count=`ls -Al "$MOUNTPOINT" 2>/dev/null | grep -v "^total" | grep -v "^l" -c`
 
224
count=`ls -Al "$MOUNTPOINT" 2>/dev/null | egrep -c "^[drwx-]{10}"`
225
225
if [ "$count" != "0" ]; then
226
226
        error "$MOUNTPOINT must be empty before proceeding"
227
227
fi
228
 
count=`ls -Al "$CRYPTDIR" 2>/dev/null | grep -v "^total" -c`
 
228
count=`ls -Al "$CRYPTDIR" 2>/dev/null | egrep -c "^[dlrwx-]{10}"`
229
229
if [ "$count" != "0" ]; then
230
230
        error "$CRYPTDIR must be empty before proceeding"
231
231
fi