extrahd: Skip relative mountpoints

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2023-08-02 09:14:14 +00:00
parent b49e4eec45
commit 80eac2b523

View File

@@ -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