diff options
| -rw-r--r-- | meta/recipes-core/udev/udev-extraconf/mount.sh | 8 | ||||
| -rw-r--r-- | meta/recipes-core/udev/udev-extraconf_1.1.bb | 9 |
2 files changed, 10 insertions, 7 deletions
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index eb84a468be..0cbae48729 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh | |||
| @@ -83,11 +83,11 @@ automount_systemd() { | |||
| 83 | 83 | ||
| 84 | MOUNT="$MOUNT -o silent" | 84 | MOUNT="$MOUNT -o silent" |
| 85 | 85 | ||
| 86 | # If filesystemtype is vfat, change the ownership group to 'disk', and | 86 | # If filesystemtype is vfat, change the ownership group to mount group, and |
| 87 | # grant it with w/r/x permissions. | 87 | # grant it with w/r/x permissions. |
| 88 | case $ID_FS_TYPE in | 88 | case $ID_FS_TYPE in |
| 89 | vfat|fat) | 89 | vfat|fat) |
| 90 | MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`" | 90 | MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^@MOUNT_GROUP@:/{print $3}' /etc/group`" |
| 91 | ;; | 91 | ;; |
| 92 | swap) | 92 | swap) |
| 93 | return ;; | 93 | return ;; |
| @@ -138,11 +138,11 @@ automount() { | |||
| 138 | MOUNT="$MOUNT -o silent" | 138 | MOUNT="$MOUNT -o silent" |
| 139 | fi | 139 | fi |
| 140 | 140 | ||
| 141 | # If filesystem type is vfat, change the ownership group to 'disk', and | 141 | # If filesystem type is vfat, change the ownership group to mount group, and |
| 142 | # grant it with w/r/x permissions. | 142 | # grant it with w/r/x permissions. |
| 143 | case $ID_FS_TYPE in | 143 | case $ID_FS_TYPE in |
| 144 | vfat|fat) | 144 | vfat|fat) |
| 145 | MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`" | 145 | MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^@MOUNT_GROUP@:/{print $3}' /etc/group`" |
| 146 | ;; | 146 | ;; |
| 147 | swap) | 147 | swap) |
| 148 | return ;; | 148 | return ;; |
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb index 0e2abcd424..0d7e4f4f36 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.1.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb | |||
| @@ -17,6 +17,7 @@ S = "${WORKDIR}/sources" | |||
| 17 | UNPACKDIR = "${S}" | 17 | UNPACKDIR = "${S}" |
| 18 | 18 | ||
| 19 | MOUNT_BASE = "/run/media" | 19 | MOUNT_BASE = "/run/media" |
| 20 | MOUNT_GROUP ?= "disk" | ||
| 20 | 21 | ||
| 21 | do_install() { | 22 | do_install() { |
| 22 | install -d ${D}${sysconfdir}/udev/rules.d | 23 | install -d ${D}${sysconfdir}/udev/rules.d |
| @@ -31,9 +32,11 @@ do_install() { | |||
| 31 | install -d ${D}${sysconfdir}/udev/scripts/ | 32 | install -d ${D}${sysconfdir}/udev/scripts/ |
| 32 | 33 | ||
| 33 | install -m 0755 ${S}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh | 34 | install -m 0755 ${S}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh |
| 34 | sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh | 35 | sed -e 's|@systemd_unitdir@|${systemd_unitdir}|g' \ |
| 35 | sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh | 36 | -e 's|@base_sbindir@|${base_sbindir}|g' \ |
| 36 | sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' ${D}${sysconfdir}/udev/scripts/mount.sh | 37 | -e 's|@MOUNT_BASE@|${MOUNT_BASE}|g' \ |
| 38 | -e 's|@MOUNT_GROUP@|${MOUNT_GROUP}|g' \ | ||
| 39 | -i ${D}${sysconfdir}/udev/scripts/mount.sh | ||
| 37 | 40 | ||
| 38 | install -m 0755 ${S}/network.sh ${D}${sysconfdir}/udev/scripts | 41 | install -m 0755 ${S}/network.sh ${D}${sysconfdir}/udev/scripts |
| 39 | } | 42 | } |
