= udev = == Automount usb stick == File /etc/udev/rules.d/99-automount.rules {{{#!highlight bash ACTION=="add",KERNEL=="sd[b-z]", PROGRAM="automount" ACTION=="remove",KERNEL=="sd[b-z]", PROGRAM="automount" }}} File /lib/udev/automount with chmod 755: {{{#!highlight bash #!/bin/bash PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin DEV=$(basename $DEVNAME) echo "$DEV $ACTION" >> /tmp/env.txt case $ACTION in add) mkdir -p /mnt/memory/$DEV logger "automount: $ACTION $DEV" mount -ouser,umask=0000 /dev/$DEV /mnt/memory/$DEV ;; remove) logger "automount: $ACTION $DEV" umount /mnt/memory/$DEV ;; esac }}}