From: Dan McGregor <danismostlikely@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Daniel McGregor <daniel.mcgregor@vecima.com>
Subject: [PATCH v5 1/3] nfs-utils: clean up startup
Date: Thu, 28 Mar 2024 19:24:10 -0600 [thread overview]
Message-ID: <20240329012413.892379-1-danismostlikely@gmail.com> (raw)
From: Daniel McGregor <daniel.mcgregor@vecima.com>
Change the sysvinit script to start at the S runlevel, this matches
Debian, and prevents systemd from generating a unit file for it.
Also have the nfsd systemd service request the nfsd kernel filesystem
mountpoint. This avoids startup failures in unpriviled containers
or other setups that don't support the filesystem.
Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
---
meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon | 4 ++--
meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.4.bb | 9 ++++-----
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon
index 992267d5a16..4c1ad17c3c6 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon
@@ -3,7 +3,7 @@
# Provides: nfs-common
# Required-Start: $portmap hwclock
# Required-Stop: $portmap hwclock
-# Default-Start: 2 3 4 5
+# Default-Start: S
# Default-Stop: 0 1 6
# Short-Description: NFS support for both client and server
# Description: NFS is a popular protocol for file sharing across
@@ -20,7 +20,7 @@
. /etc/init.d/functions
test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/rpc.statd
-test -z "$STATD_PID" && STATD_PID=/var/run/rpc.statd.pid
+test -z "$STATD_PID" && STATD_PID=/run/rpc.statd.pid
#
# The default state directory is /var/lib/nfs
test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.4.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.4.bb
index 2f2644f9a83..527fcd609c1 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.4.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.4.bb
@@ -132,15 +132,14 @@ do_install:append () {
install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_system_unitdir}/
install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_system_unitdir}/
install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_system_unitdir}/
+ install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_system_unitdir}/
sed -i -e 's,@SBINDIR@,${sbindir},g' \
-e 's,@SYSCONFDIR@,${sysconfdir},g' \
-e 's,@HIGH_RLIMIT_NOFILE@,${HIGH_RLIMIT_NOFILE},g' \
${D}${systemd_system_unitdir}/*.service
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_system_unitdir}/
- install -d ${D}${systemd_system_unitdir}/sysinit.target.wants/
- ln -sf ../proc-fs-nfsd.mount ${D}${systemd_system_unitdir}/sysinit.target.wants/proc-fs-nfsd.mount
- fi
+ # Add compatibility symlinks for the sysvinit scripts
+ ln -s nfs-server.service ${D}${systemd_system_unitdir}/nfsserver.service
+ ln -s /dev/null ${D}${systemd_system_unitdir}/nfscommon.service
# kernel code as of 3.8 hard-codes this path as a default
install -d ${D}/var/lib/nfs/v4recovery
--
2.41.0
next reply other threads:[~2024-03-29 1:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 1:24 Dan McGregor [this message]
2024-03-29 1:24 ` [PATCH v5 2/3] nfs-utils: Use upstream systemd service files Dan McGregor
2024-03-29 1:24 ` [PATCH v5 3/3] nfs-utils: Configure nfsv4 ID mapping & Kerberos Dan McGregor
2024-03-29 5:34 ` [OE-core] " Alexander Kanavin
2024-04-01 20:22 ` Dan McGregor
2024-03-31 21:34 ` [OE-core] [PATCH v5 1/3] nfs-utils: clean up startup Alexandre Belloni
2024-04-03 23:24 ` Dan McGregor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240329012413.892379-1-danismostlikely@gmail.com \
--to=danismostlikely@gmail.com \
--cc=daniel.mcgregor@vecima.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox