From 0db17f62d2ad9cc3e5cefd9c2099edf3986ced10 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Wed, 8 Jan 2025 12:25:35 +0100 Subject: [PATCH] ignore system drive on laptops --- home.admin/config.scripts/blitz.data.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/home.admin/config.scripts/blitz.data.sh b/home.admin/config.scripts/blitz.data.sh index f8b77364c..b02a31b1d 100644 --- a/home.admin/config.scripts/blitz.data.sh +++ b/home.admin/config.scripts/blitz.data.sh @@ -74,6 +74,7 @@ if [ "$1" = "status" ]; then remainingDevices=0 # get a list of all existing ext4 partitions of connected storage drives + # cdrom and sd card will get ignored - but it might include install thumb drive on laptops ext4Partitions=$(lsblk -no NAME,SIZE,FSTYPE | sed 's/[└├]─//g' | grep -E "^(sd|nvme)" | grep "ext4" | \ awk '{ size=$2 @@ -275,7 +276,7 @@ if [ "$1" = "status" ]; then ######################## # PROPOSE LAYOUT - # when no storage device yet + # before setup - when there is no storage device yet if [ ${#storageDevice} -eq 0 ]; then # get a list of all connected drives >7GB ordered by size (biggest first) @@ -298,6 +299,14 @@ if [ "$1" = "status" ]; then listOfDevices=$(echo "${listOfDevices}" | grep -v "${systemDevice}") fi + # on laptop ignore identified system drive which is the INSTALL thumb drive on setup + if [ "${computerType}" = "laptop" ]; then + systemDevice="" + systemSizeGB="" + systemPartition="" + systemMountedPath="" + fi + # Set STORAGE (the biggest drive) storageDevice=$(echo "${listOfDevices}" | head -n1 | awk '{print $1}') storageSizeGB=$(echo "${listOfDevices}" | head -n1 | awk '{print $2}') @@ -340,7 +349,7 @@ if [ "$1" = "status" ]; then fi fi - # Set DATA + # Set DATA (check last, because it more common to have STORAGE & DATA combined) if [ ${#dataDevice} -eq 0 ]; then # when no data device yet: take the second biggest drive as the data drive