summaryrefslogtreecommitdiffstats
path: root/rescue/diskdrake-resize
blob: 96157b9f567289d5bd9938f3c3021d102b446d43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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);
a0de8eacaecb1914333f9d4facb4ac44cb'>perl-install/share parent854e603dc751754d1e86712056e5553376ca8f8e (diff)downloaddrakx-046612a0de8eacaecb1914333f9d4facb4ac44cb.tar
drakx-046612a0de8eacaecb1914333f9d4facb4ac44cb.tar.gz
drakx-046612a0de8eacaecb1914333f9d4facb4ac44cb.tar.bz2
drakx-046612a0de8eacaecb1914333f9d4facb4ac44cb.tar.xz
drakx-046612a0de8eacaecb1914333f9d4facb4ac44cb.zip
Added translation for "recommended" string
Diffstat (limited to 'perl-install/share')