From d01ec608b30d96d334adda5f0784045884d2011c Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 29 Jun 2009 16:01:59 +0000 Subject: allow to specify main partition in the restore config file (MAIN_PART_NUMBER), if there is a restore partition at beginning of disk --- rescue/restore-image.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'rescue/restore-image.sh') 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 -- cgit v1.2.1