summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev/udev-extraconf_1.1.bb
diff options
context:
space:
mode:
authorHongzhi.Song <hongzhi.song@windriver.com>2018-04-17 03:03:43 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-17 08:41:44 +0100
commit4ca9402c37205df4ea70c154f17b01c91a48176a (patch)
tree323483a6ea46e137e3c79f566a942ca3dc7ccc74 /meta/recipes-core/udev/udev-extraconf_1.1.bb
parentdd29a499a15f4bd043115f53795108ae5eb64240 (diff)
downloadpoky-4ca9402c37205df4ea70c154f17b01c91a48176a.tar.gz
udev-extraconf: Add systemd-mount to udev-extraconf/mount.sh
Udev-extraconf works correctly with sysvinit in the aspect of automounting block devices. But it has a serious problem in case of systemd. Block devices automounted by udev is unaccessible to host space(out of udevd's private namespace). For example, we cannot format those block devices. e.g. root@qemux86:~# mkfs.ext4 /dev/sda1 mke2fs 1.43.8 (1-Jan-2018) /dev/sda1 contains a ext4 file system last mounted on Tue Apr 3 06:22:41 2018 Proceed anyway? (y,N) y /dev/sda1 is apparently in use by the system; will not make a filesystem here! Other distributions has no such problem, because they use a series of rules to manager block devices. Different types of block devices match different rules. But udev-extraconf just use one rule, automount.rules, which results in this problem. The 'systemd-mount' command is recommended by the systemd community to solve such problems. This patch makes use of 'systemd-mount' to solve the above problem. [YOCTO #12644] (From OE-Core rev: a0b3389c5afc23f622f793cbad8b4135093e6f08) (From OE-Core rev: 4af22800a7af4fcb80cafe08d982a4850d9dd2ad) Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/udev/udev-extraconf_1.1.bb')
-rw-r--r--meta/recipes-core/udev/udev-extraconf_1.1.bb3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb
index 43a1cff731..90f933d981 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -29,6 +29,9 @@ do_install() {
29 install -d ${D}${sysconfdir}/udev/scripts/ 29 install -d ${D}${sysconfdir}/udev/scripts/
30 30
31 install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh 31 install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
32 sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh
33 sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh
34
32 install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts 35 install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
33} 36}
34 37