From 44d727aa18e7f089b77b09cd310963526c458df6 Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Fri, 10 Sep 2010 04:09:57 +0200 Subject: [PATCH] udev/mount.sh: Added creation of .hal-mtab, so that unmounting in Thunar works now. --- recipes/udev/udev-151/omap3-pandora/mount.sh | 12 +++++++++--- recipes/udev/udev_151.bb | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/recipes/udev/udev-151/omap3-pandora/mount.sh b/recipes/udev/udev-151/omap3-pandora/mount.sh index d69ae9d784..420f52f82e 100755 --- a/recipes/udev/udev-151/omap3-pandora/mount.sh +++ b/recipes/udev/udev-151/omap3-pandora/mount.sh @@ -34,13 +34,18 @@ automount() { fi ! test -d "/media/$name" && mkdir -p "/media/$name" - if ! $MOUNT -t auto -o dirsync,noatime,umask=0 $DEVNAME "/media/$name" && ! $MOUNT -t auto -o dirsync,noatime $DEVNAME "/media/$name" + + if ! $MOUNT -t auto -o dirsync,noatime,umask=0,gid=1000 $DEVNAME "/media/$name" && ! $MOUNT -t auto -o dirsync,noatime,umask=0,gid=1000 $DEVNAME "/media/$name" then #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!" - rm_dir "/media/$name" + rmdir "/media/$name" else logger "mount.sh/automount" "Auto-mount of [/media/$name] successful" touch "/tmp/.automount-$name3" + fstype=$(cat /etc/mtab | grep $DEVNAME | awk '{print $3}') + echo "$DEVNAME 1000 0 $fstype dirsync,noatime,umask=0,gid=1000 /media/$name" >> /media/.hal-mtab + chgrp wheel /media/.hal-mtab + touch /media/.hal-mtab-lock fi } @@ -82,6 +87,7 @@ if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then done # Remove empty directories from auto-mounter - + sed -e "/$name3/d" /media/.hal-mtab > /tmp/.hal-mtab + mv /tmp/.hal-mtab /media/.hal-mtab test -e "/tmp/.automount-$name3" && rm_dir "$mnt2" fi diff --git a/recipes/udev/udev_151.bb b/recipes/udev/udev_151.bb index 8e798fb1ff..63b47f8f15 100644 --- a/recipes/udev/udev_151.bb +++ b/recipes/udev/udev_151.bb @@ -3,7 +3,7 @@ DESCRIPTION = "udev is a daemon which dynamically creates and removes device nod the hotplug package and requires a kernel not older than 2.6.12." LICENSE = "GPLv2+" -PR = "r16" +PR = "r17" # Untested DEFAULT_PREFERENCE = "-1" -- 2.39.5