diff options
author | Caio Begotti <caio1982@mandriva.org> | 2009-02-06 15:49:13 +0000 |
---|---|---|
committer | Caio Begotti <caio1982@mandriva.org> | 2009-02-06 15:49:13 +0000 |
commit | 3b59141d88ac174896e3c1d553406f80607646b6 (patch) | |
tree | 7b28c88e179c85e48664f1ab72e20d24c59e7900 /rescue/restore-image.sh | |
parent | a524fefb04074d9d19e186f9bdbae29b239bcc7f (diff) | |
download | drakx-3b59141d88ac174896e3c1d553406f80607646b6.tar drakx-3b59141d88ac174896e3c1d553406f80607646b6.tar.gz drakx-3b59141d88ac174896e3c1d553406f80607646b6.tar.bz2 drakx-3b59141d88ac174896e3c1d553406f80607646b6.tar.xz drakx-3b59141d88ac174896e3c1d553406f80607646b6.zip |
check for min_disksize devices
Diffstat (limited to 'rescue/restore-image.sh')
-rwxr-xr-x | rescue/restore-image.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index 5fe7b6417..c167c4e1d 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -86,6 +86,10 @@ function detect_root() dev=$(sed '\|'$restore_media'|!d;s/[0-9] .*$//;s/^.*\///' /proc/mounts) devices=$(grep "^ .*[^0-9]$" < /proc/partitions | grep -v ${dev} | awk '$3 > '$MIN_DISKSIZE' { print $4,$3 }') + if [ -z ${devices} ]; then + exit 1 + fi + devs_found=$(echo $devices | wc -w) # we might use it later again fdisk -l | grep "^/dev/" | grep -v ${dev} > /tmp/fdisk.log |