View | Details | Raw Unified | Return to bug 31713
Collapse All | Expand All

(-)a/univention-ucc-remote-mount/add_fstab_entry (-5 / +10 lines)
 Lines 75-86   if [ "$1" = "add" ] || [ "$1" = "remove" ]; then Link Here 
75
    devicename=$(basename $2) # normally "cdrom"
75
    devicename=$(basename $2) # normally "cdrom"
76
    fstype="$3"
76
    fstype="$3"
77
    if [ "$1" = "remove" ]; then # call remove_fstab_entry
77
    if [ "$1" = "remove" ]; then # call remove_fstab_entry
78
		/lib/udev/remove_fstab_entry "$2" "$3"
78
        /lib/udev/remove_fstab_entry "$2" "$3"
79
        res=$?
80
        if [ "${ID_TYPE}" = "cd" ]; then
81
            # remove_fstab_entry will stop cdpinger because it don't see the difference 
82
            # to an CD-eject, so we restart cdpinger here
83
            call_cdpinger $devicename
84
            res=$?
85
        fi
86
        exit $res
79
    fi
87
    fi
80
    # remove_fstab_entry will stop cdpinger because it don't see the difference 
81
    # to an CD-eject, so we restart cdpinger here
82
    call_cdpinger $devicename
83
    return 0
84
else
88
else
85
    devicename=$(basename $1)
89
    devicename=$(basename $1)
86
fi
90
fi
 Lines 166-171   if [ ! -d $MOUNTPOINT ];then Link Here 
166
   	mkdir ${MOUNTPOINT}
170
   	mkdir ${MOUNTPOINT}
167
fi
171
fi
168
172
173
echo "Device mounted: $devicename" | logger
169
mount $mountoptions $filesystemoptions /dev/$devicename ${MOUNTPOINT}
174
mount $mountoptions $filesystemoptions /dev/$devicename ${MOUNTPOINT}
170
175
171
if [ $? -ne 0 ]; then
176
if [ $? -ne 0 ]; then
(-)a/univention-ucc-remote-mount/remove_fstab_entry (+5 lines)
 Lines 32-37   echo "univention-ucc-remote-mount: remove_fstab_entry called, options: $1 $2 $3" Link Here 
32
32
33
devicename=$(basename $1)
33
devicename=$(basename $1)
34
34
35
if [ $# -eq 1 ]; then
36
	/lib/udev/add_fstab_entry remove "${devicename}" auto
37
	exit $?
38
fi
39
35
grep /dev/$devicename /proc/mounts | while read DEV MOUNTPOINT REST; do
40
grep /dev/$devicename /proc/mounts | while read DEV MOUNTPOINT REST; do
36
	umount -l ${DEV} 2>&1 >/dev/null # might fail for cdrom devices
41
	umount -l ${DEV} 2>&1 >/dev/null # might fail for cdrom devices
37
	umount ${MOUNTPOINT} 2>&1 >/dev/null
42
	umount ${MOUNTPOINT} 2>&1 >/dev/null

Return to bug 31713