mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [ptxdist] [PATCH 1/2] ptxd_make_nfsd_exec: sync with upstream
Date: Thu,  9 Apr 2020 09:35:32 +0200	[thread overview]
Message-ID: <20200409073533.30522-2-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20200409073533.30522-1-m.olbrich@pengutronix.de>

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 configs/platform-v7a/scripts/lib/ptxd_make_nfsd.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/configs/platform-v7a/scripts/lib/ptxd_make_nfsd.sh b/configs/platform-v7a/scripts/lib/ptxd_make_nfsd.sh
index 00fb2e8222e0..5a95628b5324 100644
--- a/configs/platform-v7a/scripts/lib/ptxd_make_nfsd.sh
+++ b/configs/platform-v7a/scripts/lib/ptxd_make_nfsd.sh
@@ -8,6 +8,7 @@
 
 ptxd_make_nfsd_exec() {
     local port
+    local client_specifications
     local root="/$(basename "${ptx_nfsroot}")"
     local base="$(dirname "${ptx_nfsroot}")"
 
@@ -15,13 +16,18 @@ ptxd_make_nfsd_exec() {
 	port=2049
     fi
 
+    if ! client_specifications="$(ptxd_get_kconfig "${PTXDIST_BOARDSETUP}" "PTXCONF_BOARDSETUP_NFSROOT_CLIENT_SPECIFICATIONS")"; then
+	client_specifications="(rw,no_root_squash)"
+    fi
+
     echo
     echo "Mount rootfs with nfsroot=${root},v3,tcp,port=${port},mountport=${port}"
     echo
 
     #insecure for qemu with -net user
-    echo "/ (rw,no_root_squash,insecure)" > "${PTXDIST_TEMPDIR}/exports" &&
-    UNFS_BASE="${base}" unfsd -e "${PTXDIST_TEMPDIR}/exports" -n ${port} -m ${port} -p -d
+    client_specifications="${client_specifications},insecure"
+    echo "/ ${client_specifications}" > "${PTXDIST_TEMPDIR}/exports" &&
+    UNFS_BASE="${base}" unfsd -e "${PTXDIST_TEMPDIR}/exports" -n ${port} -m ${port} -p -d "${@}"
 }
 export -f ptxd_make_nfsd_exec
 
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2020-04-09  7:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09  7:35 [ptxdist] [PATCH 0/2] Prepare for PTXdist 2020.04.0 Michael Olbrich
2020-04-09  7:35 ` Michael Olbrich [this message]
2020-04-09  7:35 ` [ptxdist] [PATCH 2/2] platform-v7a: run: use security_model=mapped-file when possible Michael Olbrich
2020-04-09  7:36 ` [ptxdist] [PATCH 0/2] Prepare for PTXdist 2020.04.0 Michael Olbrich

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=20200409073533.30522-2-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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