summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-06-29 16:01:59 +0000
committerOlivier Blin <oblin@mandriva.com>2009-06-29 16:01:59 +0000
commita78b96e815d589dc7f45bd78106a259fa4be6147 (patch)
tree81982d82de875f7258370bab3f0f8c8117b9e2e6
parentaf93e156a7e9b75298054cb49669ac1a9c31990d (diff)
downloaddrakx-backup-do-not-use-a78b96e815d589dc7f45bd78106a259fa4be6147.tar
drakx-backup-do-not-use-a78b96e815d589dc7f45bd78106a259fa4be6147.tar.gz
drakx-backup-do-not-use-a78b96e815d589dc7f45bd78106a259fa4be6147.tar.bz2
drakx-backup-do-not-use-a78b96e815d589dc7f45bd78106a259fa4be6147.tar.xz
drakx-backup-do-not-use-a78b96e815d589dc7f45bd78106a259fa4be6147.zip
allow to specify main partition in the restore config file (MAIN_PART_NUMBER), if there is a restore partition at beginning of disk
-rw-r--r--rescue/NEWS3
-rwxr-xr-xrescue/restore-image.sh7
2 files changed, 9 insertions, 1 deletions
diff --git a/rescue/NEWS b/rescue/NEWS
index dd29618e0..743a68983 100644
--- a/rescue/NEWS
+++ b/rescue/NEWS
@@ -1,4 +1,7 @@
- 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.12.4 - 17 June 2009, by Olivier "blino" Blin
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