mirror of
https://git.yoctoproject.org/poky
synced 2026-03-19 13:49:41 +01:00
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>
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
.include @systemd_unitdir@/system/systemd-udevd.service
|
||||
[Service]
|
||||
MountFlags=shared
|
||||
@@ -11,7 +11,6 @@ SRC_URI = " \
|
||||
file://autonet.rules \
|
||||
file://network.sh \
|
||||
file://localextra.rules \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://systemd-udevd.service', '', d)} \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
@@ -36,16 +35,21 @@ do_install() {
|
||||
sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' ${D}${sysconfdir}/udev/scripts/mount.sh
|
||||
|
||||
install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
install -d ${D}${sysconfdir}/systemd/system
|
||||
install ${WORKDIR}/systemd-udevd.service ${D}${sysconfdir}/systemd/system/systemd-udevd.service
|
||||
sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/systemd/system/systemd-udevd.service
|
||||
fi
|
||||
}
|
||||
|
||||
FILES:${PN} = "${sysconfdir}/udev ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${sysconfdir}/systemd/system/systemd-udevd.service', '', d)}"
|
||||
RDEPENDS:${PN} = "udev util-linux-blkid"
|
||||
pkg_postinst:${PN} () {
|
||||
if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then
|
||||
sed -i "/\[Service\]/aMountFlags=shared" $D${systemd_unitdir}/system/systemd-udevd.service
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm:${PN} () {
|
||||
if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then
|
||||
sed -i "/MountFlags=shared/d" $D${systemd_unitdir}/system/systemd-udevd.service
|
||||
fi
|
||||
}
|
||||
|
||||
RDEPENDS:${PN} = "udev util-linux-blkid ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}"
|
||||
CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist"
|
||||
|
||||
# to replace udev-extra-rules from meta-oe
|
||||
|
||||
Reference in New Issue
Block a user