From d6962977569c4b4172ba344c00ba4eee0b127132 Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Mon, 11 Sep 2023 17:13:07 +0300 Subject: [PATCH] Add tmpfs file system detection --- 4_scripts/imagetools_01_exif_statistics.sh | 2 +- 4_scripts/imagetools_02_dualiso.sh | 2 +- 4_scripts/imagetools_03_raw_resolution-baseline.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/4_scripts/imagetools_01_exif_statistics.sh b/4_scripts/imagetools_01_exif_statistics.sh index 223914c..c231910 100644 --- a/4_scripts/imagetools_01_exif_statistics.sh +++ b/4_scripts/imagetools_01_exif_statistics.sh @@ -211,7 +211,7 @@ FILENAME=$(echo "${DIR_BASENAME}-${FIRST}-${LAST}_metadata") FILE_EXT=.csv #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?|?rewritefs|/dev/nvme?" | sed '/^\s*$/d' | wc -l) +INPUT_FILESYSTEM=$(df -h "${1}" | awk -F ' ' 'FNR> 1 {print $1}' | grep -i -E "/dev/sd?|/dev/hd?|?rewritefs|?tmpfs|/dev/nvme?" | sed '/^\s*$/d' | wc -l) ####################################################################### # 2ND FILE CHECK diff --git a/4_scripts/imagetools_02_dualiso.sh b/4_scripts/imagetools_02_dualiso.sh index f3ed4f0..acc70ec 100644 --- a/4_scripts/imagetools_02_dualiso.sh +++ b/4_scripts/imagetools_02_dualiso.sh @@ -30,7 +30,7 @@ # We don't allow writing to SD card. #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?|?rewritefs|/dev/nvme?" | sed '/^\s*$/d' | wc -l) +INPUT_FILESYSTEM=$(df -h "${1}" | awk -F ' ' 'FNR> 1 {print $1}' | grep -i -E "/dev/sd?|/dev/hd?|?rewritefs|?tmpfs|/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 kdialog --error "Image(s) are in a SD Card. Please move them your local or external storage and try again." diff --git a/4_scripts/imagetools_03_raw_resolution-baseline.sh b/4_scripts/imagetools_03_raw_resolution-baseline.sh index 4dbb36b..60bce66 100644 --- a/4_scripts/imagetools_03_raw_resolution-baseline.sh +++ b/4_scripts/imagetools_03_raw_resolution-baseline.sh @@ -23,7 +23,7 @@ # We don't allow writing to SD card. #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?|?rewritefs|/dev/nvme?" | sed '/^\s*$/d' | wc -l) +INPUT_FILESYSTEM=$(df -h "${1}" | awk -F ' ' 'FNR> 1 {print $1}' | grep -i -E "/dev/sd?|/dev/hd?|?rewritefs|?tmpfs|/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 kdialog --error "Image(s) are in a SD Card. Please move them your local or external storage and try again."