From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Michael Olbrich Date: Thu, 9 Apr 2020 09:37:30 +0200 Message-Id: <20200409073731.31677-2-m.olbrich@pengutronix.de> In-Reply-To: <20200409073731.31677-1-m.olbrich@pengutronix.de> References: <20200409073731.31677-1-m.olbrich@pengutronix.de> MIME-Version: 1.0 Subject: [DistroKit] [PATCH 1/2] ptxd_make_nfsd_exec: sync with upstream List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: distrokit-bounces@pengutronix.de Sender: "DistroKit" To: distrokit@pengutronix.de Cc: Michael Olbrich Signed-off-by: Michael Olbrich --- 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 _______________________________________________ DistroKit mailing list DistroKit@pengutronix.de