From ea060d82e5a938f311245686c6463f31ef971df8 Mon Sep 17 00:00:00 2001 From: Caio Begotti Date: Wed, 29 Oct 2008 18:40:24 +0000 Subject: adding a minimum size for disks to be detected and filter the smalls ones out --- rescue/restore-image-lib.sh | 1 + rescue/restore-image.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'rescue') diff --git a/rescue/restore-image-lib.sh b/rescue/restore-image-lib.sh index 625b96cca..b6d31a53a 100755 --- a/rescue/restore-image-lib.sh +++ b/rescue/restore-image-lib.sh @@ -2,6 +2,7 @@ TITLE="Mandriva Installer" BACKTITLE="Mandriva" +MIN_DISKSIZE=800000 debug="/dev/null" diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index 4e2f06708..07fdc9437 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -74,7 +74,7 @@ do you want to continue?\n " function detect_root() { dev=$(sed '/\/tmp\/media/!d;s/[0-9] .*$//;s/^.*\///' /proc/mounts) - devices=$(grep "^ .*[^0-9]$" < /proc/partitions | grep -v ${dev} | awk '{ print $4,$3 }') + devices=$(grep "^ .*[^0-9]$" < /proc/partitions | grep -v ${dev} | awk '$3 > $MIN_DISKSIZE { print $4,$3 }') devs_found=$(echo $devices | wc -w) if [ "$devs_found" -gt "2" ]; then -- cgit v1.2.1