Univention Bugzilla – Attachment 5272 Details for
Bug 31713
Changing CDs doesn't work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix CD mount when changing CDs
fix_cd_mount.patch (text/plain), 1.88 KB, created by
Jan Christoph Ebersbach
on 2013-06-11 14:54 CEST
(
hide
)
Description:
Fix CD mount when changing CDs
Filename:
MIME Type:
Creator:
Jan Christoph Ebersbach
Created:
2013-06-11 14:54 CEST
Size:
1.88 KB
patch
obsolete
>diff --git a/univention-ucc-remote-mount/add_fstab_entry b/univention-ucc-remote-mount/add_fstab_entry >index c4013ac..3f940d4 100755 >--- a/ucc/univention-ucc-remote-mount/add_fstab_entry >+++ b/ucc/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 >diff --git a/univention-ucc-remote-mount/remove_fstab_entry b/univention-ucc-remote-mount/remove_fstab_entry >index d8a1459..8d8c7b1 100755 >--- a/univention-ucc-remote-mount/remove_fstab_entry >+++ b/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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 31713
: 5272