diff options
author | root <root@rshg054.dnsready.net> | 2012-01-23 23:15:06 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-01-23 23:15:06 +0000 |
commit | c6c657b8bcf062b5d19eff6298b7754c11838080 (patch) | |
tree | ed6a14e27d40adfcc821fe921e95aa9e9ab4585b /community-staging/calibre/calibre-mount-helper | |
parent | 164067832916c8e59219e1b0f30d7d04618a536e (diff) |
Mon Jan 23 23:15:06 UTC 2012
Diffstat (limited to 'community-staging/calibre/calibre-mount-helper')
-rw-r--r-- | community-staging/calibre/calibre-mount-helper | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/community-staging/calibre/calibre-mount-helper b/community-staging/calibre/calibre-mount-helper new file mode 100644 index 000000000..00cac4270 --- /dev/null +++ b/community-staging/calibre/calibre-mount-helper @@ -0,0 +1,28 @@ +#!/bin/sh -e +# Replacement for upstream mount helper using udisks/eject +# (C) 2010 Martin Pitt <mpitt@debian.org> + +ACTION="$1" +DEV="$2" + +case "$ACTION" in + mount) + udisks --mount "$DEV" + + # check if mount worked. If not, fail + # udisks does return 0 even if mount failed + mount | grep -q "$DEV" || exit 0 + ;; + + eject) + eject "$DEV" + ;; + + cleanup) + ;; + + *) + echo "unknown action" >&2 + exit 1 +esac + |