From ad260ed516dd67eff0dddb9dc798e4e13e7239b7 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 2 Apr 2025 22:26:41 +0200 Subject: [PATCH] fix: Ignore missing custom .pat after install --- src/install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/install.sh b/src/install.sh index 2a40f99..c5558ef 100644 --- a/src/install.sh +++ b/src/install.sh @@ -13,12 +13,16 @@ else fi FN="boot.pat" -if [ -d "/$FN" ]; then - error "The file /$FN does not exist, please make sure that you mapped it to a valid path!" && exit 65 +DIR=$(find / -maxdepth 1 -type d -iname "$FN" | head -n 1) +[ ! -d "$DIR" ] && DIR=$(find "$STORAGE" -maxdepth 1 -type d -iname "$FN" | head -n 1) + +if [ -d "$DIR" ]; then + error "The bind $DIR maps to a file that does not exist!" && exit 65 fi FILE=$(find / -maxdepth 1 -type f -iname "$FN" | head -n 1) [ ! -s "$FILE" ] && FILE=$(find "$STORAGE" -maxdepth 1 -type f -iname "$FN" | head -n 1) + [ -s "$FILE" ] && BASE="DSM_VirtualDSM" && URL="file://$FILE" if [ -n "$URL" ]; then