Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp399907lqb; Tue, 4 Jun 2024 15:08:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUTdEq4AWD1IbW2Og1me4KMyWRoRG7DjmIHi78slEwmcmqsy9u9ItltW6k8wec3NU38LGsK/GW5lFKezWg+YtCo/r0ilwEEU9hh7lM+lA== X-Google-Smtp-Source: AGHT+IHODXKVm/EOYX0/ak2/xpC/pW4NSo+oSB3ULKxCYNu4zmg4HwwY06ZacbTkPffVOIb1fAsR X-Received: by 2002:a50:cd9a:0:b0:57a:33a5:9b71 with SMTP id 4fb4d7f45d1cf-57a8bc8d22amr605976a12.33.1717538921223; Tue, 04 Jun 2024 15:08:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717538921; cv=pass; d=google.com; s=arc-20160816; b=o7XUsiWLRd1y7is+uoo/dMgbmj38CA/JCRThlewtmKwABm3uCFD47tVHirZTjhtGEF V814tRZsDHbV+Hk0l2/kjLscTsovyo8QhxSbY2wBFi1sqTIrspoijRk86fq/+tbcBxvS LQbPUos7I5sZBZ1hxfOqHGJBOBdmkcuJGqw98+iAWFmBlUK4rIgTjoStIHil5XRrXjxE gRLH36kh8SHNeqWD/QwItIWzEFht5PhxBJeD/zc+a/bA61DWSm9x/5EeTi6YkARKc6Iu /MrRAye0gNgBK/N0LrbWCBUAEHSiZ5KH9IuSiUQ4l1yL6pLxGWBGCNM2C2L1pYqchF+R RfBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=I+fGsOwsdxHTba6vhAfnyc9+U6zBF8OjSnvhiTu/D6g=; fh=/OWPPlFN6TE0QWnyruJXfIhTSqzujodC9vFPVG69zww=; b=bmQpCicx571pchJOoC6W2oAF2bZewBxUOWuWcVHIxj3nVQxti6Q08bA0T9vcgaFA2f HqIc1lhT4TezLFoL6sNPAahNUoN2CUKIC/ClZNVqv10jEn3kHqET+IDFbZdAI/SRjQuW uxdqfSH+GXPKcDU00xQfYwEcwHV+0jvNz1dYB6z02DyUVscB1C46w6chqw0HYPTBn9Em HL8p/OgpEjB/4s2r1PogRxXNmYqKk7KG/xwCbHWJsIiJV+4IeUMv7Vko6aGTmo1s/Nbh teN4ogwHsdwOeAYN3HO4ITKB7ZbIRFSKHDetc/AWFUJzZ9wrdNJSh3w+w/pQZwaYNeTK 3WBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sf9NV0u1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3558-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3558-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a36e06b4esi5475078a12.597.2024.06.04.15.08.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 15:08:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3558-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sf9NV0u1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3558-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3558-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AA9681F21F38 for ; Tue, 4 Jun 2024 22:07:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0553143744; Tue, 4 Jun 2024 22:07:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Sf9NV0u1" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABEDE320C for ; Tue, 4 Jun 2024 22:07:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717538867; cv=none; b=VKJBhojRmQzImdytjWV+R1gUVu4wfyecOygp170jX14d+Io5icdoanb9cE+6Z5MZLFSAF2k5A3+//6FiBrLIT1HkUiBJSkETqjU7vF56Mpko3FyZr/onO18eNt/w+vR6pBUtSn8EH51nh6m6IpRn6k9q3FzfZY7F2s12FxiovxM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717538867; c=relaxed/simple; bh=lYKYMPFfHFQCdQYZ243zPsEk7WfGlGjBQ5vqPkX77Ck=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=M5qrBpJVZ+8rLUBCA5I21ilPqg0YJ1zu48GQ5AHkF5WT5tF1WT3Ftpcix/wA+cgXF7x509v3IOiAG/j2/JBD0IyVxITuXCIkvGiJAh/ewO4VV/nYqhATS4Zsh9EmMX1kIUIQI6oQW3hKwjEd5Py6HH2E39TQDMh/CZ1GHDyz2kY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Sf9NV0u1; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2D36C4AF0A; Tue, 4 Jun 2024 22:07:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717538866; bh=lYKYMPFfHFQCdQYZ243zPsEk7WfGlGjBQ5vqPkX77Ck=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Sf9NV0u1E4Ti/xsQL8hV82Qm3sGhlKyxoQQj3RRMVEFu/bAtQYV7ksAwWvqis98vT jJTycc8Eg1jCyR8WLll6gA2IqpVBzWdkJF2dBpwAJJZhi01+4QK8wqxJMjYPeNLJtp ve1BOLAcaETMm632tvKennWisU9sSjuc8CeqSgQcA464+cXQPNL4TEjJrB3RUiA48E 2v91qV1vff67+GCy7lnDZJtaw4bsZJKAxm42xSgZ3kt6lM0q8dgp5TWwd4dtyqi9cj eo251hjp3Y9ULcyQPg0aLDExwX21+MzoWt8ei/4HqgeBolsmyruUCQ2pc2wC9ZkHtX GzU7z/G9wPIAw== From: Jeff Layton Date: Tue, 04 Jun 2024 18:07:31 -0400 Subject: [PATCH nfs-utils v4 3/3] systemd: use nfsdctl to start and stop the nfs server Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240604-nfsdctl-v4-3-a2941f782e4c@kernel.org> References: <20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org> In-Reply-To: <20240604-nfsdctl-v4-0-a2941f782e4c@kernel.org> To: Steve Dickson , Lorenzo Bianconi , Chuck Lever , Neil Brown Cc: linux-nfs@vger.kernel.org, Jeff Layton X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=906; i=jlayton@kernel.org; h=from:subject:message-id; bh=lYKYMPFfHFQCdQYZ243zPsEk7WfGlGjBQ5vqPkX77Ck=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBmX5AvaxlJtnqCCv9BXvpNnixev4Ayy4/WAmYkg tORVJS2MquJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZl+QLwAKCRAADmhBGVaC FXpcD/9uq3fjmfU2KJ6jjTiJLFN8shLjNnroc+t6SXg6YHrzXqQBzCqxEnrBLKYss7aujj8LDNo ddeLJBF1t41Lipw3OYW6EFNTibTGzo0O238YBC0D2P0YcKbOkv2K+2VcOxA/+RnMkFhDXz+km2e vXVuHwqSxJSUD95x23N9bjWXd0QPxnN/6em3EUkQpMsImyrfP8Wk26xxYvnAnSfftTKtyvypNAp +P75qQckZ781ydz7fk6pOaWtr2faPhuApPoztebQeb4B3H7yo6tsv6P6ycMIWM1iRQBVbcNtVkL 4H2fOMrrW46D/s/kxc9DyKExPStbppdpaapVsdHb1p/Rrxbf73a9pApGtilif3Xk/V7VbQuaMHr JKSarVHuezxNzU+VQ0vR2f+TyNyHbf0hY3jUweaGXjhzmEv1OhDoVFkABS5TZysp29qiHCQN90z H+cyJC2plMHz4A4WUkZ55Bu35zDn6WAazqOiEZiHcaWRIbsJmooNipETY+HZTeUUeZQgM9JlXYC gJRXksghHXQjQc6IxxeJGG/Bl/vVdzpIuL7WYqsHrybMdIgH70b3caXBKA9AzAK3Zjzr92+Yf7j YkAyo8UuvAzyWw2O1ZKR9/q/BSd6bB/jc4w5Wno4hHm6CELkC9edsrByJnEuJvlA0ZyWJe95kdZ S6ssrJ3buYnJq0g== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 Attempt to use nfsdctl to start and stop the nfs-server. If that fails for any reason, use rpc.nfsd to do it instead. Signed-off-by: Jeff Layton --- systemd/nfs-server.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service index ac17d5286d3b..8793856aa707 100644 --- a/systemd/nfs-server.service +++ b/systemd/nfs-server.service @@ -23,8 +23,8 @@ After=rpc-gssd.service gssproxy.service rpc-svcgssd.service Type=oneshot RemainAfterExit=yes ExecStartPre=-/usr/sbin/exportfs -r -ExecStart=/usr/sbin/rpc.nfsd -ExecStop=/usr/sbin/rpc.nfsd 0 +ExecStart=/bin/sh -c '/usr/sbin/nfsdctl autostart || /usr/sbin/rpc.nfsd' +ExecStop=/bin/sh -c '/usr/sbin/nfsdctl threads 0 || /usr/sbin/rpc.nfsd 0' ExecStopPost=/usr/sbin/exportfs -au ExecStopPost=/usr/sbin/exportfs -f -- 2.45.1