summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-11-05 15:23:57 +0000
committerOlivier Blin <oblin@mandriva.com>2008-11-05 15:23:57 +0000
commit6ccbc23b5ce8622ed441ef98e22a9a5bceb659fc (patch)
tree33767f5835fff44b1e24fcccee00935307a88526
parent63933c297ca7dbb3523c1ec2ae24b58812a7a55a (diff)
downloaddrakx-6ccbc23b5ce8622ed441ef98e22a9a5bceb659fc.tar
drakx-6ccbc23b5ce8622ed441ef98e22a9a5bceb659fc.tar.gz
drakx-6ccbc23b5ce8622ed441ef98e22a9a5bceb659fc.tar.bz2
drakx-6ccbc23b5ce8622ed441ef98e22a9a5bceb659fc.tar.xz
drakx-6ccbc23b5ce8622ed441ef98e22a9a5bceb659fc.zip
add disk and main_part variables
-rwxr-xr-xrescue/restore-image.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh
index 2e0c37dc9..49d5f59c1 100755
--- a/rescue/restore-image.sh
+++ b/rescue/restore-image.sh
@@ -150,9 +150,11 @@ function expand_fs()
filesystem_type=$(dumpe2fs -h /dev/${root}1 2>/dev/null| grep "Filesystem OS type" | awk '{ print $4 }')
if [ $filesystem_type = "Linux" ]; then
dialog --backtitle "$BACKTITLE" --title "$TITLE" --infobox "Installing... Finishing Install..." 3 40
- sfdisk -d /dev/$root | sed -e "/${root}1/ s/size=.*,/size= ,/" | sfdisk -f /dev/$root
- e2fsck -fy /dev/${root}1
- resize2fs /dev/${root}1
+ disk=/dev/$root
+ main_part=/dev/${root}1
+ sfdisk -d $disk | sed -e "\|$main_part| s/size=.*,/size= ,/" | sfdisk -f $disk
+ e2fsck -fy $main_part
+ resize2fs $main_part
fi
}