mirror of
https://git.yoctoproject.org/poky
synced 2026-04-19 06:32:13 +02:00
rpcbind: Fix boot time start failure
With commits 90bc1810 ("bitbake.conf: Add runtimedir") and
561e853e ("rpcbind: Specify state directory under /run") rpcbind
still can fail during startup with:
rpcbind: /var/run/rpcbind.lock: Read-only file system
The lockfile is hardcoded as "/var/run/rpcbind.lock".
While it should use the same internal define "RPCBIND_STATEDIR"
as the paths for rpcbind.xdr and portmap.xdr, it's not necessary
to be patched because of the default value of ${runtimedir} and
the presence of the /var/run -> /run symlink.
Using --with-statedir=/run/rpcbind adds the line
RequiresMountsFor=/run/rpcbind
to the service but it doesn't guarantee that /run is writable yet
when rpcbind.service starts. Add this guarantee by running
rpcbind.service with systemd-tmpfiles-setup.service and add the
tmpfiles.d entry for /run/rpcbind.
(From OE-Core rev: 53fb871f84c99a66485979da2588c1d11d8749e7)
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
2dded99583
commit
ee83d0fdae
3
meta/recipes-extended/rpcbind/rpcbind/rpcbind.systemd
Normal file
3
meta/recipes-extended/rpcbind/rpcbind/rpcbind.systemd
Normal file
@@ -0,0 +1,3 @@
|
||||
[Unit]
|
||||
# Make sure the runtime directory exists
|
||||
After=systemd-tmpfiles-setup.service
|
||||
1
meta/recipes-extended/rpcbind/rpcbind/rpcbind.tmpfiles
Normal file
1
meta/recipes-extended/rpcbind/rpcbind/rpcbind.tmpfiles
Normal file
@@ -0,0 +1 @@
|
||||
d /run/rpcbind 0755 root root -
|
||||
@@ -13,6 +13,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
|
||||
file://init.d \
|
||||
file://rpcbind.conf \
|
||||
file://rpcbind.tmpfiles \
|
||||
file://rpcbind.systemd \
|
||||
file://rpcbind_add_option_to_fix_port_number.patch \
|
||||
file://0001-systemd-use-EnvironmentFile.patch \
|
||||
"
|
||||
@@ -49,7 +51,15 @@ do_install:append () {
|
||||
${UNPACKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind
|
||||
chmod 0755 ${D}${sysconfdir}/init.d/rpcbind
|
||||
install -m 0644 ${UNPACKDIR}/rpcbind.conf ${D}${sysconfdir}/rpcbind.conf
|
||||
|
||||
install -d ${D}${sysconfdir}/tmpfiles.d
|
||||
install -m 0644 ${UNPACKDIR}/rpcbind.tmpfiles ${D}${sysconfdir}/tmpfiles.d/rpcbind.conf
|
||||
|
||||
install -d ${D}${systemd_system_unitdir}/rpcbind.service.d
|
||||
install -m 0644 ${UNPACKDIR}/rpcbind.systemd ${D}${systemd_system_unitdir}/rpcbind.service.d/rpcbind.conf
|
||||
}
|
||||
|
||||
FILES:${PN} += "${systemd_system_unitdir}/rpcbind.service.d/rpcbind.conf"
|
||||
|
||||
ALTERNATIVE:${PN} = "rpcinfo"
|
||||
ALTERNATIVE_LINK_NAME[rpcinfo] = "${bindir}/rpcinfo"
|
||||
|
||||
Reference in New Issue
Block a user