From 67cec188ce5ed7c98cda1219dbd2b514084135bf Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 30 May 2024 07:49:38 -0700 Subject: [PATCH] docker: fix partition detection --- install/docker/setup-scrypted-nvr-volume.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/install/docker/setup-scrypted-nvr-volume.sh b/install/docker/setup-scrypted-nvr-volume.sh index cf80da691d..844c3c70bb 100644 --- a/install/docker/setup-scrypted-nvr-volume.sh +++ b/install/docker/setup-scrypted-nvr-volume.sh @@ -96,7 +96,17 @@ then set +e sync - mkfs -F -t ext4 "$BLOCK_DEVICE"1 + PARTITION_DEVICE="$BLOCK_DEVICE"1 + if [ ! -e "$PARTITION_DEVICE" ] + then + PARTITION_DEVICE="$BLOCK_DEVICE"p1 + if [ ! -e "$PARTITION_DEVICE" ] + then + echo "Unable to determine block device partition from block device: $BLOCK_DEVICE" + exit 1 + fi + fi + mkfs -F -t ext4 "$PARTITION_DEVICE" sync # parse/evaluate blkid line as env vars