forked from projg2/uam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuam.conf
153 lines (113 loc) · 5.35 KB
/
uam.conf
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# NOTE:
# This is just a sourced bash script, so think what you put here.
# If you'd like to use $ sign, you must enclose string in '' or escape it.
# If you'd like to use some other variable, feel free to use it.
# In booleans 1, 'y', 't', 'yes', 'true' and 'on' evaluate as true.
# Whether to log progress verbosely, or just print a plain summary at the end.
VERBOSE=0
# A trace file path if tracing should be enabled. Leave empty otherwise.
# (it might be a good idea to place this file in /run, to have R/W ASAP)
TRACE=
# Base path for all uam-created mountpoints.
MOUNTPOINT_BASE='/media'
# Permissions to set on created parent directories and mountpoints.
PARENT_PERMS=0755
MP_PERMS=0700
# GID and umask of mounted filesystems like VFAT or NTFS.
# Is used directly in MOUNT_OPTS configvar.
MOUNT_GROUP='plugdev'
MOUNT_UMASK=07
MOUNT_FMASK=0117 # -x
# Options to pass to mount (default -- will be used if no specific defined).
MOUNT_OPTS='noatime'
# Options to pass to mount with a specific filesystem. For known ids, see udev's
# ${ID_FS_TYPE}. The suffixes MUST be uppercase (unless you have bash with
# case-insensitive variable names).
MOUNT_OPTS_VFAT="umask=${MOUNT_UMASK},fmask=${MOUNT_FMASK},gid=${MOUNT_GROUP},${MOUNT_OPTS}"
MOUNT_OPTS_NTFS="${MOUNT_OPTS_VFAT}"
# You may also use MOUNT_OPTS_* to use a different fs type than one detected
# by mount, e.g.:
MOUNT_OPTS_NTFS_3G="${MOUNT_OPTS_VFAT} -t ntfs-3g"
# MOUNT_OPTS_NTFS_3G="${MOUNT_OPTS_VFAT},force -t ntfs-3g"
# Whether to try to remount fs R/O if umount fails.
UMOUNT_TRY_RO=1
# Whether to engage an lazy-umount if umount fails.
UMOUNT_TRY_LAZY=1
# Whether to remove created mountpoints after umount or mount failure.
REMOVE_MOUNTPOINTS=1
# Whether to search for and remove unused mountpoints when we receive umount
# request for non-mounted (already unmounted?) device.
CLEANUP_ALLOW=1
# How deep to search for unused mountpoints under ${MOUNTPOINT_BASE}.
# 0 means to look only directly under ${MOUNTPOINT_BASE}, 1 to look in its'
# subdirectories etc. If not set, we try to count slashes in
# ${MOUNTPOINT_TEMPLATES}.
# CLEANUP_MAXDEPTH=0
# Whether we should stay on the same filesystem when searching for unused
# mounpoints (to avoid reading through floppies, CDs etc.). If you use
# mountpoints on a different filesystem than ${MOUNTPOINT_BASE} and you want to
# cleanup them too, set this to false.
CLEANUP_XDEV=1
# Whether to search for and remove symlinks to removed mountpoints.
CLEANUP_SYMLINKS=1
# 'Array' of possible mountpoint name templates to use (uam will use first free).
# Can contain pathnames relative to ${MOUNTPOINT_BASE}. If you'd like to use
# absolute pathnames here, just set MOUNTPOINT_BASE=''.
#
# You can use any environment variable provided by udev, including:
# ${ID_FS_TYPE} for fs type (ext2, swap, vfat, etc.)
# ${ID_FS_UUID_ENC} for fs UUID (unique identifier)
# ${ID_FS_LABEL_ENC} for fs label (user-specified)
# Below will work only under real udev, not when launched manually:
# ${ID_SERIAL} for full serial of device (incl. vendor, model and inst)
# ${ID_SERIAL_SHORT} for actual serial of device
# You can also use the following additional uam-specific vars:
# ${DEVBASENAME} to get basename of the device (i.e. sda1)
# ${PARTN} partition number (i.e. 1)
# ${SERIAL} like ${ID_SERIAL}, but without the instance
# If you would like to lookup these for a specific device, please call:
# /sbin/blkid -o udev /dev/sdXY
# or (with older udev):
# /lib/udev/vol_id /dev/sdXY
#
# If your /bin/sh points to bash you might also use standard bash array below.
# Simply change the single quotes below to parentheses and everything should
# work fine. Please notice that due to the nature of processing array variables,
# real bash arrays need to be 'directly' interpolated by bash while
# pseudo-arrays have to be quoted to prevent variable interpolation.
MOUNTPOINT_TEMPLATES='
"${ID_FS_LABEL_ENC}" # label
"${ID_FS_LABEL_ENC:+${SERIAL}-${ID_FS_LABEL_ENC}}" # serial-label (if -n label)
"${SERIAL:+${SERIAL}-${PARTN}}" # serial-partition number
"${DEVBASENAME}" # sdXY
'
# Templates used for mountpoint symlink creation, i.e. to get nice names. Can
# overlap with MOUNTPOINT_TEMPLATES - when overlapping mountpoint is used the
# symlink will be skipped.
#SYMLINK_TEMPLATES='
# "by-id/${SERIAL}"
#'
# Enable or disable supplied default hooks.
# Wait for /media to become writable before starting to mount. This is required
# in order to mount correctly media already inserted on boot.
HOOK_WAIT_FOR_MEDIA=1
# Notice user about (u)mounts using libnotify. This requires the sw-notify-send
# hack: x11-misc/sw-notify-send or http://github.com/mgorny/tinynotify-send/
HOOK_SW_NOTIFY=1
# Store additional (${MOUNT_GROUP}-readable) cache for uam-pmount helper.
# Disabled when unset.
HOOK_PMOUNT_CACHE=
#HOOK_PMOUNT_CACHE=/run/uam.cache
# Filter out devices you don't want uam to handle. The function below should
# return true value when a particular device should not be mounted and false
# otherwise (which is equal to not declaring the func at all).
#
# The following example disables mounting partitions with one of the predefined
# UUIDs (these are VFAT-style UUIDs). Please notice that it is either necessary
# to use boolean operators or '&& return 0' to keep returned value clean.
#
# filter_devices() {
# [ "${ID_FS_UUID}" = "1234-5678" ] || \
# [ "${ID_FS_UUID}" = "ABCD-ABCD" ]
# }
# vim:syntax=sh