udev rule to enable automounting with acl support
I am trying to create a udev rule that will allow me to mount an ext4 disk with acl option while preserving user unmountability. The following rule (adapted from https:/
# Leave sda to fstab
KERNEL!="sd[b-z]*", GOTO="media_
# We are handling only ext4 partitions
ENV{ID_
# Import FS info
IMPORT{
# Get a label if present, otherwise specify one
ENV{ID_
ENV{ID_
# Mount options
ACTION=="add", ENV{mount_
# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/
# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/
# Exit
LABEL="
This works when copied to /etc/udev/
The file /lib/udev/
Another problem is that the entries in /media will remain if the disk is unmounted but not actually unplugged, which will cause my backup scripts to fill up the root partition (this never happens with the default udev setup. Of course I could rewrite the scripts if necessary, but I'd rather fix this behaviour).
I am using ubuntu maverick with kernel 2.6.35-29-generic.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Ubuntu udev Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: