From: Michael Tremer Date: Wed, 2 Aug 2023 09:14:15 +0000 (+0000) Subject: extrahd: Do not try to umount if nothing is mounted X-Git-Tag: v2.27-core179~9^2~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=88513c0ef56c0bba4e074d15c49b19af74016c86;p=ipfire-2.x.git extrahd: Do not try to umount if nothing is mounted Signed-off-by: Michael Tremer --- diff --git a/config/extrahd/extrahd.pl b/config/extrahd/extrahd.pl index eba3f9b37b..145a2a43a1 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