Created
January 18, 2011 20:41
-
-
Save narkisr/785101 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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=1 | |
# A trace file path if tracing should be enabled. Leave empty otherwise. | |
TRACE=/uam.log | |
# 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 | |
# 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},gid=${MOUNT_GROUP},${MOUNT_OPTS}" | |
MOUNT_OPTS_NTFS="${MOUNT_OPTS_VFAT}" | |
# You may also use MOUNT_OPTS_* to use ntfs-3g, e.g.: | |
# MOUNT_OPTS_NTFS="${MOUNTS_OPTS_VFAT} -t ntfs-3g" | |
# MOUNT_OPTS_NTFS="${MOUNTS_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}-${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. | |
# Notice user about (u)mounts using libnotify. This requires the sw-notify-send | |
# hack: x11-misc/sw-notify-send or http://proj.mgorny.alt.pl/misc/#sw-notify-send | |
HOOK_SW_NOTIFY=1 | |
# vim:syntax=sh:ts=4:tw=80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment