]> code.ossystems Code Review - openembedded-core.git/commit
udev-extraconf: Add systemd-mount to udev-extraconf/mount.sh
authorHongzhi.Song <hongzhi.song@windriver.com>
Tue, 17 Apr 2018 07:03:43 +0000 (03:03 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Sep 2018 07:39:20 +0000 (08:39 +0100)
commit4af22800a7af4fcb80cafe08d982a4850d9dd2ad
tree157ffa8462fe71e9eb283d782cecb57ed1713b77
parenta5b0265e83f3c5a222c1b08bc853bec40e5a5148
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)

Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/udev/udev-extraconf/mount.sh
meta/recipes-core/udev/udev-extraconf_1.1.bb