diff options
| author | Ming Liu <liu.ming50@gmail.com> | 2022-07-17 14:56:47 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-07-25 15:11:46 +0100 |
| commit | 342745ce67dac1147a603dbd44251c9a0dd2bb90 (patch) | |
| tree | 52680c9b39cfca900a35e5ef4e5a9f9b2ae4f9c6 | |
| parent | a19f966ef5a47bff998ae51062aebfececf4e7e2 (diff) | |
| download | poky-342745ce67dac1147a603dbd44251c9a0dd2bb90.tar.gz | |
udev-extraconf: fix some systemd automount issues
The '.include' syntax has been dropped from latest systemd releases,
we need drop the systemd-udevd.service here, introduce a postinst
function to add "MountFlags=shared" to systemd-udevd.service.
Also lsblk binary is being called in mount.sh automount_systemd
function, add it to RDEPENDS.
(From OE-Core rev: a3c93ec301a34413f91e3edb70c16454ebcdcdf2)
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 356520d60b9429c6f62124821e42468ff2b7b1d6)
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/udev/udev-extraconf/systemd-udevd.service | 3 | ||||
| -rw-r--r-- | meta/recipes-core/udev/udev-extraconf_1.1.bb | 20 |
2 files changed, 12 insertions, 11 deletions
diff --git a/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service b/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service deleted file mode 100644 index a9b86eb6e4..0000000000 --- a/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | .include @systemd_unitdir@/system/systemd-udevd.service | ||
| 2 | [Service] | ||
| 3 | MountFlags=shared | ||
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb index ef6019259e..30f1fe76d0 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.1.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb | |||
| @@ -11,7 +11,6 @@ SRC_URI = " \ | |||
| 11 | file://autonet.rules \ | 11 | file://autonet.rules \ |
| 12 | file://network.sh \ | 12 | file://network.sh \ |
| 13 | file://localextra.rules \ | 13 | file://localextra.rules \ |
| 14 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://systemd-udevd.service', '', d)} \ | ||
| 15 | " | 14 | " |
| 16 | 15 | ||
| 17 | S = "${WORKDIR}" | 16 | S = "${WORKDIR}" |
| @@ -36,16 +35,21 @@ do_install() { | |||
| 36 | sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' ${D}${sysconfdir}/udev/scripts/mount.sh | 35 | sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' ${D}${sysconfdir}/udev/scripts/mount.sh |
| 37 | 36 | ||
| 38 | install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts | 37 | install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts |
| 38 | } | ||
| 39 | |||
| 40 | pkg_postinst:${PN} () { | ||
| 41 | if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then | ||
| 42 | sed -i "/\[Service\]/aMountFlags=shared" $D${systemd_unitdir}/system/systemd-udevd.service | ||
| 43 | fi | ||
| 44 | } | ||
| 39 | 45 | ||
| 40 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 46 | pkg_postrm:${PN} () { |
| 41 | install -d ${D}${sysconfdir}/systemd/system | 47 | if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then |
| 42 | install ${WORKDIR}/systemd-udevd.service ${D}${sysconfdir}/systemd/system/systemd-udevd.service | 48 | sed -i "/MountFlags=shared/d" $D${systemd_unitdir}/system/systemd-udevd.service |
| 43 | sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/systemd/system/systemd-udevd.service | 49 | fi |
| 44 | fi | ||
| 45 | } | 50 | } |
| 46 | 51 | ||
| 47 | FILES:${PN} = "${sysconfdir}/udev ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${sysconfdir}/systemd/system/systemd-udevd.service', '', d)}" | 52 | RDEPENDS:${PN} = "udev util-linux-blkid ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}" |
| 48 | RDEPENDS:${PN} = "udev util-linux-blkid" | ||
| 49 | CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist" | 53 | CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist" |
| 50 | 54 | ||
| 51 | # to replace udev-extra-rules from meta-oe | 55 | # to replace udev-extra-rules from meta-oe |
