--- a/univention-ucc-remote-mount/add_fstab_entry +++ a/univention-ucc-remote-mount/add_fstab_entry @@ -75,12 +75,16 @@ if [ "$1" = "add" ] || [ "$1" = "remove" ]; then devicename=$(basename $2) # normally "cdrom" fstype="$3" if [ "$1" = "remove" ]; then # call remove_fstab_entry - /lib/udev/remove_fstab_entry "$2" "$3" + /lib/udev/remove_fstab_entry "$2" "$3" + res=$? + if [ "${ID_TYPE}" = "cd" ]; then + # remove_fstab_entry will stop cdpinger because it don't see the difference + # to an CD-eject, so we restart cdpinger here + call_cdpinger $devicename + res=$? + fi + exit $res fi - # remove_fstab_entry will stop cdpinger because it don't see the difference - # to an CD-eject, so we restart cdpinger here - call_cdpinger $devicename - return 0 else devicename=$(basename $1) fi @@ -166,6 +170,7 @@ if [ ! -d $MOUNTPOINT ];then mkdir ${MOUNTPOINT} fi +echo "Device mounted: $devicename" | logger mount $mountoptions $filesystemoptions /dev/$devicename ${MOUNTPOINT} if [ $? -ne 0 ]; then --- a/univention-ucc-remote-mount/remove_fstab_entry +++ a/univention-ucc-remote-mount/remove_fstab_entry @@ -32,6 +32,11 @@ echo "univention-ucc-remote-mount: remove_fstab_entry called, options: $1 $2 $3" devicename=$(basename $1) +if [ $# -eq 1 ]; then + /lib/udev/add_fstab_entry remove "${devicename}" auto + exit $? +fi + grep /dev/$devicename /proc/mounts | while read DEV MOUNTPOINT REST; do umount -l ${DEV} 2>&1 >/dev/null # might fail for cdrom devices umount ${MOUNTPOINT} 2>&1 >/dev/null