diff options
author | root <root@rshg054.dnsready.net> | 2012-12-29 02:13:48 -0800 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-12-29 02:13:48 -0800 |
commit | 5dd7ed82e788ebad2e920e0f2db7468cc6547cfe (patch) | |
tree | f467412e09912ababcd8fe6c05193d829f514dcd /community/calibre/calibre-mount-helper | |
parent | 3009e8addb4a894329bf8ab3e8fb763361833978 (diff) |
Sat Dec 29 02:10:20 PST 2012
Diffstat (limited to 'community/calibre/calibre-mount-helper')
-rwxr-xr-x | community/calibre/calibre-mount-helper | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/community/calibre/calibre-mount-helper b/community/calibre/calibre-mount-helper new file mode 100755 index 000000000..00cac4270 --- /dev/null +++ b/community/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 + |