File: usbmount.dev

package info (click to toggle)
usbmount 0.0.10
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 76 kB
  • ctags: 2
  • sloc: sh: 185; makefile: 1
file content (38 lines) | stat: -rwxr-xr-x 1,079 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# This script mounts USB mass storage devices when they are plugged in
# and unmounts them when they are removed.
# Copyright (C) 2004, 2005 Martin Dickopp
#
# This file is free software; the copyright holder gives unlimited
# permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
#
set -e

# Exit if the (un)mounting script is not executable.
test -x /usr/share/usbmount/usbmount || exit 0

# Default values for configuration variables.
MOUNTPOINTS=""
FILESYSTEMS=""
MOUNTOPTIONS=""
FS_MOUNTOPTIONS=""
VERBOSE="no"

# Read configuration file.
if test -r /etc/usbmount/usbmount.conf; then
    . /etc/usbmount/usbmount.conf
fi

# Execute (un)mounting script.
export MOUNTPOINTS
export FILESYSTEMS
export MOUNTOPTIONS
export FS_MOUNTOPTIONS
export VERBOSE
exec /usr/share/usbmount/usbmount "$@"