summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-10 16:43:41 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-10 16:43:41 +0000
commit8d88a6db0971dcf0d07287408e8ce15fd3481954 (patch)
treeb5be395523263ba26bd337f6c4af48081536410d
parente385deea9c6444b8836724e6458dd02f6234bce7 (diff)
downloaddrakx-8d88a6db0971dcf0d07287408e8ce15fd3481954.tar
drakx-8d88a6db0971dcf0d07287408e8ce15fd3481954.tar.gz
drakx-8d88a6db0971dcf0d07287408e8ce15fd3481954.tar.bz2
drakx-8d88a6db0971dcf0d07287408e8ce15fd3481954.tar.xz
drakx-8d88a6db0971dcf0d07287408e8ce15fd3481954.zip
- fix computing the minimal size for reiserfs resizing
- use run_program::run instead of system for calling resizing tools
-rw-r--r--perl-install/diskdrake/interactive.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index fa3593d89..37296997b 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -627,7 +627,7 @@ sub Resize {
write_partitions($in, $hd) or return;
if (defined (my $free = fs::df($part))) {
$nice_resize{reiserfs} = 1;
- $min = max($min, $free);
+ $min = max($min, $part->{size} - $free);
}
} elsif (isThisFs('xfs', $part) && isLVM($hd) && $::isStandalone && isMounted($part)) {
$min = $part->{size}; #- ensure the user can only increase
@@ -675,13 +675,13 @@ sub Resize {
} elsif ($nice_resize{ext2}) {
my $s = int(($part->{size} << 9) / $block_size);
log::l("resize2fs $nice_resize{ext2} to size $s in block of $block_size bytes");
- system "resize2fs", "-pf", $nice_resize{ext2}, $s;
+ run_program::run("resize2fs", "-pf", $nice_resize{ext2}, $s);
} elsif ($nice_resize{reiserfs}) {
log::l("reiser resize to $part->{size} sectors");
- install_any::check_prog ("resize_reiserfs") if $::isInstall;
- system "resize_reiserfs", "-f", "-q", "-s" . $part->{size}/2 . "K", devices::make($part->{device});
+ run_program::run("resize_reiserfs", "-f", "-q", "-s" . $part->{size}/2 . "K", devices::make($part->{device}));
} elsif ($nice_resize{xfs}) {
- system "xfs_growfs", $part->{mntpoint};
+ #- happens only with mounted LVM, see above
+ run_program::run("xfs_growfs", $part->{mntpoint});
}
if (%nice_resize) {