On Thu, Aug 14, 2008 at 12:12 PM, Mike Rooney <email address hidden> wrote:
> - It currently can't detect the mount state, so it assumes it is mounted when run. Change this on line 89 if yours isn't mounted, or just mount it before running. Can anyone give me a Python line[s] that will detect this?
Hi Mike-
I can point you to the source code of ecryptfs-setup-private, where I
have a check (in shell code) to see if it's already mounted. It looks
something like this:
...
# Check for active mounts
MOUNTPOINT="$HOME/$PRIVATE_DIR"
CRYPTDIR="$HOME/.$PRIVATE_DIR"
grep -qs "$MOUNTPOINT " /proc/mounts && error "[$MOUNTPOINT] is already mounted"
grep -qs "$CRYPTDIR " /proc/mounts && error "[$CRYPTDIR] is already mounted"
...
Basically, dig through /proc/mounts looking for the private directory.
On Thu, Aug 14, 2008 at 12:12 PM, Mike Rooney <email address hidden> wrote:
> - It currently can't detect the mount state, so it assumes it is mounted when run. Change this on line 89 if yours isn't mounted, or just mount it before running. Can anyone give me a Python line[s] that will detect this?
Hi Mike-
I can point you to the source code of ecryptfs- setup-private, where I "$HOME/ $PRIVATE_ DIR" "$HOME/ .$PRIVATE_ DIR"
have a check (in shell code) to see if it's already mounted. It looks
something like this:
...
# Check for active mounts
MOUNTPOINT=
CRYPTDIR=
grep -qs "$MOUNTPOINT " /proc/mounts && error "[$MOUNTPOINT] is already mounted"
grep -qs "$CRYPTDIR " /proc/mounts && error "[$CRYPTDIR] is already mounted"
...
Basically, dig through /proc/mounts looking for the private directory.
:-Dustin