]> git.pld-linux.org Git - packages/calibre.git/blame - calibre-mount-helper
- up to 6.23.0
[packages/calibre.git] / calibre-mount-helper
CommitLineData
d383d054
MM
1#!/bin/sh -e
2# Replacement for upstream mount helper using udisks/eject
3# (C) 2010 Martin Pitt <mpitt@debian.org>
4
5ACTION="$1"
6DEV="$2"
7
8case "$ACTION" in
9 mount)
10 udisks --mount "$DEV"
11
12 # check if mount worked. If not, fail
13 # udisks does return 0 even if mount failed
14 mount | grep -q "$DEV" || exit 0
15 ;;
16
17 eject)
18 eject "$DEV"
19 ;;
20
21 cleanup)
22 ;;
23
24 *)
25 echo "unknown action" >&2
26 exit 1
27esac
28
This page took 0.314497 seconds and 4 git commands to generate.