mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-22 16:10:55 +02:00
ignore system drive on laptops
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user