diff options
Diffstat (limited to 'rescue/restore-image.sh')
-rwxr-xr-x | rescue/restore-image.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index cc1ab6cab..8e5567d0a 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -132,10 +132,22 @@ function write_image() fi } +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 + fi +} + # installation steps welcome install_warning write_image +expand_fs # all done! _msgbox "\nInstallation process finished.\nPress ENTER to shutdown.\n " |