Update to Phil Wright solution, for a more general context

1 - Create a udev rules file '/etc/udev/rules.d/61-sr-change.rules' and
add the line :

KERNEL=="sr*", ACTION=="change", RUN+="/usr/local/bin/sr_change.sh %n"

2 - And create the script '/usr/local/bin/sr_change.sh' :

#!/bin/sh
 
if [ $# -eq 1 ]
then
        source=/dev/sr$1
else
        source=/dev/sr0
fi

dvd+rw-mediainfo $source > /dev/null
n=$?

 if [ "$n" -eq '251' ]  then 
        umount $source
 fi
exit 0

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1168742

Title:
  Disks are not unmounted when physical eject button is used

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1168742/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to