mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-26 17:51:48 +01:00
detect install drive
This commit is contained in:
parent
8656d2179f
commit
58233df141
@ -493,6 +493,19 @@ if [ "$action" = "status" ] || [ "$action" = "mount" ] || [ "$action" = "unmount
|
||||
dataDeviceName=$(find_by_id_filename "${dataDevice}")
|
||||
fi
|
||||
|
||||
#################
|
||||
# Install Device
|
||||
|
||||
# find the first device (sd card, usb, cd rom) with a boot partition
|
||||
installDevice=""
|
||||
possibleInstallDevices = $(lsblk -o NAME,TRAN -d | grep -E 'mmc|usb|sr' | cut -d' ' -f1)
|
||||
for device in ${possibleInstallDevices}; do
|
||||
if parted "/dev/${device}" print 2>/dev/null | grep "^ *[0-9]" | grep -q "boot\|esp\|lba"; then
|
||||
installDevice="${device}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
#################
|
||||
# Define Scenario
|
||||
|
||||
@ -564,6 +577,7 @@ if [ "$action" = "status" ] || [ "$action" = "mount" ] || [ "$action" = "unmount
|
||||
echo "dataMountedPath='${dataMountedPath}'"
|
||||
echo "dataConfigFound='${dataConfigFound}'"
|
||||
echo "dataInspectSuccess='${dataInspectSuccess}'"
|
||||
echo "installDevice='${installDevice}'"
|
||||
echo "combinedDataStorage='${combinedDataStorage}'"
|
||||
echo "bootFromStorage='${bootFromStorage}'"
|
||||
echo "bootFromSD='${bootFromSD}'"
|
||||
|
Loading…
x
Reference in New Issue
Block a user