From 3ad8138da571de74ac7bb89451d83130da7ba5a8 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 25 May 2023 09:54:56 +0100 Subject: [PATCH] extrahd: Skip relative mountpoints Signed-off-by: Michael Tremer --- config/extrahd/extrahd.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/extrahd/extrahd.pl b/config/extrahd/extrahd.pl index be91e27f60..eba3f9b37b 100644 --- a/config/extrahd/extrahd.pl +++ b/config/extrahd/extrahd.pl @@ -40,6 +40,12 @@ extrahd_mount() { continue fi + # Check that the mountpoint starts with a slash + if [ "${mountpoint:0:1}" != "/" ]; then + log "Skipping invalid mountpoint: ${mountpoint}" + continue + fi + # Skip mounting if something is already mounted at the mountpoint if mountpoint "${mountpoint}" &>/dev/null; then continue -- 2.39.5