Browse Source

Scripts: correct SD card detection

master
Pekka Helenius 6 years ago
committed by GitHub
parent
commit
840babe290
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      4_scripts/imagetools_03_raw_resolution-baseline.sh

+ 1
- 1
4_scripts/imagetools_03_raw_resolution-baseline.sh View File

@ -23,7 +23,7 @@
# We don't allow writing to SD card. # We don't allow writing to SD card.
#Sed is here to remove any trailing spaces and crap like blank lines #Sed is here to remove any trailing spaces and crap like blank lines
INPUT_FILESYSTEM=$(df -h "${1}" | awk -F ' ' 'FNR> 1 {print $1}' | grep -i -E "/dev/sd?|/dev/hd?" | sed '/^\s*$/d' | wc -l)
INPUT_FILESYSTEM=$(df -h "${1}" | awk -F ' ' 'FNR> 1 {print $1}' | grep -i -E "/dev/sd?|/dev/hd?|?rewritefs|/dev/nvme?" | sed '/^\s*$/d' | wc -l)
if [[ "${INPUT_FILESYSTEM}" -eq 0 ]]; then #if input file (first file printed in bash) filesystem does not start with /dev/sdX if [[ "${INPUT_FILESYSTEM}" -eq 0 ]]; then #if input file (first file printed in bash) filesystem does not start with /dev/sdX
kdialog --error "Image(s) are in a SD Card. Please move them your local or external storage and try again." kdialog --error "Image(s) are in a SD Card. Please move them your local or external storage and try again."


Loading…
Cancel
Save