From: Michael Tremer Date: Wed, 2 Aug 2023 09:14:14 +0000 (+0000) Subject: extrahd: Skip relative mountpoints X-Git-Tag: v2.27-core179~9^2~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=80eac2b523c6c4aa682d565899c9de77c22b8e61;p=ipfire-2.x.git extrahd: Skip relative mountpoints Signed-off-by: Michael Tremer --- 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