diff options
author | Caio Begotti <caio1982@mandriva.org> | 2009-01-16 12:00:06 +0000 |
---|---|---|
committer | Caio Begotti <caio1982@mandriva.org> | 2009-01-16 12:00:06 +0000 |
commit | 8481dc433cd22ca4352a5bce8d976cb3aa931285 (patch) | |
tree | 4ca6721bf18e0eb19a10c8b6c16e1a75a3aa3156 /rescue | |
parent | 631287444e2d60a95b0bf717f1a845b4c427ec2a (diff) | |
download | drakx-8481dc433cd22ca4352a5bce8d976cb3aa931285.tar drakx-8481dc433cd22ca4352a5bce8d976cb3aa931285.tar.gz drakx-8481dc433cd22ca4352a5bce8d976cb3aa931285.tar.bz2 drakx-8481dc433cd22ca4352a5bce8d976cb3aa931285.tar.xz drakx-8481dc433cd22ca4352a5bce8d976cb3aa931285.zip |
adding blino's wrapper for resizing of windows partitions
Diffstat (limited to 'rescue')
-rwxr-xr-x | rescue/diskdrake-resize | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/rescue/diskdrake-resize b/rescue/diskdrake-resize new file mode 100755 index 000000000..96157b9f5 --- /dev/null +++ b/rescue/diskdrake-resize @@ -0,0 +1,28 @@ +#!/usr/bin/perl + +use lib qw(/usr/lib/libDrakX); + +use devices; +use log; +use resize_fat::main; +use diskdrake::resize_ntfs; +use diskdrake::resize_ext2; + +my ($device, $fs_type, $size) = @ARGV + or die "usage: $0 <device> <fs type> <size>\n"; + +my %fs_pkgs = ( + vfat => 'resize_fat::main', + ntfs => 'diskdrake::resize_ntfs', + ext2 => 'diskdrake::resize_ext2', + ext3 => 'diskdrake::resize_ext2', +); + +my $resize_pkg = $fs_pkgs{$fs_type} + or die "no support for $fs_type type\n"; + +log::l("resizing $device to $size"); + +my $resize = $resize_pkg->new($device, devices::make($device)) + or die "unable to initialize resize\n"; +$resize->resize($size); |