From 5dd7ed82e788ebad2e920e0f2db7468cc6547cfe Mon Sep 17 00:00:00 2001 From: root Date: Sat, 29 Dec 2012 02:13:48 -0800 Subject: Sat Dec 29 02:10:20 PST 2012 --- community/calibre/calibre-mount-helper | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 community/calibre/calibre-mount-helper (limited to 'community/calibre/calibre-mount-helper') 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 + +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 + -- cgit v1.2.3-54-g00ecf