diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-06-29 16:01:59 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-06-29 16:01:59 +0000 |
commit | d01ec608b30d96d334adda5f0784045884d2011c (patch) | |
tree | 921ca07d356987b4670327351e9672dbdbd79ceb /rescue | |
parent | 0abb7c44553fc196e7ab841a5e756c095ff68d81 (diff) | |
download | drakx-d01ec608b30d96d334adda5f0784045884d2011c.tar drakx-d01ec608b30d96d334adda5f0784045884d2011c.tar.gz drakx-d01ec608b30d96d334adda5f0784045884d2011c.tar.bz2 drakx-d01ec608b30d96d334adda5f0784045884d2011c.tar.xz drakx-d01ec608b30d96d334adda5f0784045884d2011c.zip |
allow to specify main partition in the restore config file (MAIN_PART_NUMBER), if there is a restore partition at beginning of disk
Diffstat (limited to 'rescue')
-rw-r--r-- | rescue/NEWS | 3 | ||||
-rwxr-xr-x | rescue/restore-image.sh | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/rescue/NEWS b/rescue/NEWS index a1426750d..843d8f745 100644 --- a/rescue/NEWS +++ b/rescue/NEWS @@ -1,5 +1,8 @@ - add back dumpe2fs - run /oem-rescue.sh if oem option is present on cmdline +- allow to specify main partition in the restore config file + (MAIN_PART_NUMBER), if there is a restore partition at beginning of + disk Version 1.15 - 12 June 2009, by Pascal Terjan diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index 261f41f91..4999e2695 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -323,7 +323,12 @@ EOF function expand_fs() { if [ -z "$win32_part_dev" ]; then - root=${root%[0-9]}1 + if [ -n "$MAIN_PART_NUMBER" ]; then + part_number=$MAIN_PART_NUMBER + else + part_number=1 + fi + root=${root%[0-9]}$part_number fi filesystem_type=$(dumpe2fs -h /dev/${root} 2>/dev/null| grep "Filesystem OS type" | awk '{ print $4 }') if [ "${filesystem_type}" = "Linux" ]; then |