Advertisement
Guest User

/etc/udev/uam.conf

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