summaryrefslogtreecommitdiff
path: root/recipes-core/udev/udev-extraconf/mount.patch
blob: 71ccc5684fc5618363c3ab884d4fed136a3849d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
diff -Naru old/mount.sh new/mount.sh
--- old/mount.sh	2018-05-15 09:07:02.814673114 -0500
+++ new/mount.sh	2018-05-15 09:06:30.862674060 -0500
@@ -4,7 +4,6 @@
 #
 # Attempt to mount any added block devices and umount any removed devices
 
-
 MOUNT="/bin/mount"
 PMOUNT="/usr/bin/pmount"
 UMOUNT="/bin/umount"
@@ -21,6 +20,10 @@
 	name="`basename "$DEVNAME"`"
 
 	! test -d "/run/media/$name" && mkdir -p "/run/media/$name"
+        if [ "$name" = mmcblk0p1 ] ;
+        then
+          ln -sf /run/media/$name /run/media/card
+        fi
 	# Silent util-linux's version of mounting auto
 	if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ;
 	then
@@ -31,7 +34,7 @@
 	# grant it with  w/r/x permissions.
 	case $ID_FS_TYPE in
 	vfat|fat)
-		MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
+		MOUNT="$MOUNT -o errors=continue -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
 		;;
 	# TODO
 	*)
@@ -66,7 +69,11 @@
 	if [ -x "$PMOUNT" ]; then
 		$PMOUNT $DEVNAME 2> /dev/null
 	elif [ -x $MOUNT ]; then
-    		$MOUNT $DEVNAME 2> /dev/null
+		if [[ $ID_FS_TYPE =~ fat ]] ; then
+	    		$MOUNT -o umask=002,gid=disk $DEVNAME 2> /dev/null
+		else
+	    		$MOUNT $DEVNAME 2> /dev/null
+		fi
 	fi
 	
 	# If the device isn't mounted at this point, it isn't