diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-11-12 10:13:07 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-11-12 10:13:07 +0000 |
commit | bf8643b3bcb9bd8eb8161a56d32d46fa098b33a1 (patch) | |
tree | 575f89c589b0d32ae4731506f9b9daf8777456aa | |
parent | 77d5b5d58705d88fd834a394c5f3a1be99ec620b (diff) | |
download | drakx-bf8643b3bcb9bd8eb8161a56d32d46fa098b33a1.tar drakx-bf8643b3bcb9bd8eb8161a56d32d46fa098b33a1.tar.gz drakx-bf8643b3bcb9bd8eb8161a56d32d46fa098b33a1.tar.bz2 drakx-bf8643b3bcb9bd8eb8161a56d32d46fa098b33a1.tar.xz drakx-bf8643b3bcb9bd8eb8161a56d32d46fa098b33a1.zip |
really make swap creation conditional
-rwxr-xr-x | rescue/restore-image.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index 425057113..ddb12f5e8 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -177,8 +177,10 @@ function expand_fs() sfdisk -d $disk | sed -e "\|$main_part| s/size=.*,/size= $main_part_sectors,/" | sfdisk -f $disk e2fsck -fy $main_part resize2fs $main_part - parted $disk -- mkpartfs primary linux-swap ${main_part_sectors}s -1s yes - mkswap -L swap $swap_part + if [ -n "$SWAP_BLOCKS" ]; then + parted $disk -- mkpartfs primary linux-swap ${main_part_sectors}s -1s yes + mkswap -L swap $swap_part + fi fi } |