From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 3/3] extrahd: Do not try to umount if nothing is mounted Date: Wed, 02 Aug 2023 09:14:15 +0000 Message-ID: <20230802091415.3168597-3-michael.tremer@ipfire.org> In-Reply-To: <20230802091415.3168597-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4585837446994416753==" List-Id: --===============4585837446994416753== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Signed-off-by: Michael Tremer --- config/extrahd/extrahd.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/extrahd/extrahd.pl b/config/extrahd/extrahd.pl index eba3f9b37..145a2a43a 100644 --- a/config/extrahd/extrahd.pl +++ b/config/extrahd/extrahd.pl @@ -80,6 +80,11 @@ extrahd_umount() { continue fi + # Do not try to umount if nothing is mounted + if ! mountpoint "${mountpoint}" &>/dev/null; then + continue + fi + # Umount and try lazy umount if failed if umount --quiet --recursive "${mountpoint}" || \ umount --quiet --recursive --lazy "${mountpoint}"; then -- 2.39.2 --===============4585837446994416753==--