Re: execute script after (auto)mounting external device



Hi,

Currently I'm stuck with

=====================================
## /etc/udev/rules/70-myrules.rules
##
# $ udevadm info -a -p $(udevadm info -q path -n /dev/mapper/truecrypt1)
#
# Udevadm info starts with the device specified by the devpath and then
# walks up the chain of parent devices. It prints for every device
# found, all possible attributes in the udev rules key format.
# A rule to match, can be composed by the attributes of the device
# and the attributes from one single parent device.
#
# looking at device '/devices/virtual/block/dm-0':
# KERNEL=="dm-0"
# SUBSYSTEM=="block"
# DRIVER==""
# ATTR{range}=="1"
# ATTR{ext_range}=="1"
# ATTR{removable}=="0"
# ATTR{ro}=="0"
# ATTR{size}=="6290944"
# ATTR{alignment_offset}=="0"
# ATTR{capability}=="10"
# ATTR{stat}==" 6521 0 7172 5870 1 0
1 0 0 70 5870"
#
ACTION=="add", KERNEL=="dm-[0-9]*", SUBSYSTEM=="block",
ATTR{size}=="6290944", \
RUN+="/usr/bin/touch /home/patrick/test_$(bin/date +%F-%H%M%S).txt"
=====================================

This rule does nothing when I mount the truecrypt partition :-(

Any ideas?

Patrick


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: execute script after (auto)mounting external device
    ... # Udevadm info starts with the device specified by the devpath and then ... # walks up the chain of parent devices. ... all possible attributes in the udev rules key format. ...
    (Ubuntu)
  • Re: Huawei e122 - how to make symlink to usb modem?
    ... Udevadm info starts with the device specified by the devpath and then ... walks up the chain of parent devices. ... of sheep one must, above all, be a sheep" ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Huawei e122 - how to make symlink to usb modem?
    ... walks up the chain of parent devices. ... You can't mix attributes from different parent devices, ... all possible attributes in the udev rules key format. ...
    (Debian-User)
  • Re: output from udevadm
    ... What exactly is meant by "device specified by the devpath" in ... walks up the chain of parent devices. ... all possible attributes in the udev rules key format. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)