summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2013-07-16 15:33:35 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-18 21:23:45 +0100
commit565956f82f2a5fa19ac2a8cb7ac3f372eae3bf7a (patch)
tree43bf706810aa127cc221a0fb4b5fe5fad9551a6b
parent8db36429ef328b97340ee1d9fc2e697cfdd68bff (diff)
downloadpoky-565956f82f2a5fa19ac2a8cb7ac3f372eae3bf7a.tar.gz
udev-extraconf: allow users in disk group to write vfat filesystem
If filesystem type is vfat, change the ownership group to 'disk', and grant it with w/r/x permissions. The user which belongs to 'disk' group could write the storage. [YOCTO #4004] (From OE-Core rev: eeed0cebebc945bf62b29336b9df8e2c0a975538) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/udev/udev-extraconf/mount.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index d1419ed09c..327cfc6477 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -27,6 +27,17 @@ automount() {
27 MOUNT="$MOUNT -o silent" 27 MOUNT="$MOUNT -o silent"
28 fi 28 fi
29 29
30 # If filesystem type is vfat, change the ownership group to 'disk', and
31 # grant it with w/r/x permissions.
32 case $ID_FS_TYPE in
33 vfat|fat)
34 MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
35 ;;
36 # TODO
37 *)
38 ;;
39 esac
40
30 if ! $MOUNT -t auto $DEVNAME "/media/$name" 41 if ! $MOUNT -t auto $DEVNAME "/media/$name"
31 then 42 then
32 #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!" 43 #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"